interp: show error line in first line of the traceback

Этот коммит содержится в:
Ayke van Laethem 2020-07-24 12:46:18 +02:00 коммит произвёл Ron Evans
родитель e5e324f93e
коммит 510f145a3a

Просмотреть файл

@ -47,10 +47,12 @@ func (e *Error) Error() string {
// location of the instruction. The location information may not be complete as
// it depends on debug information in the IR.
func (e *evalPackage) errorAt(inst llvm.Value, err error) *Error {
pos := getPosition(inst)
return &Error{
ImportPath: e.packagePath,
Pos: getPosition(inst),
Pos: pos,
Err: err,
Traceback: []ErrorLine{{pos, inst}},
}
}