scope.add should only record the first position
This commit is contained in:
parent
a6024f7f5f
commit
03cee0656c
|
@ -72,6 +72,10 @@ func (s *scope) deepLookup(n string) *symbol {
|
|||
}
|
||||
|
||||
func (s *scope) add(name string, kind SymKind, pos token.Pos) {
|
||||
if s.syms[name] != nil {
|
||||
return
|
||||
}
|
||||
|
||||
s.syms[name] = &symbol{
|
||||
kind: kind,
|
||||
pos: pos,
|
||||
|
|
Loading…
Reference in New Issue