Skip to content

Commit

Permalink
Improved error reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
markkurossi committed Jun 26, 2024
1 parent 11a4d76 commit 8c085a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func (p *Parser) addMethod(ti *ast.TypeInfo, f *ast.Func) error {
}
}

return fmt.Errorf("type %s.%s not found", p.pkg.Name, t.Name)
return p.errf(f.This.Location(), "type %s.%s not found", p.pkg.Name, t.Name)
}

func (p *Parser) parseGlobalVar(isConst bool,
Expand Down

0 comments on commit 8c085a0

Please sign in to comment.