Add ByID and ByToken to token.IDMap.

This commit is contained in:
Nigel Tao committed 2017-05-06 17:02:11 +10:00
1 parent f744089e9c
commit cf8167a648
4 files changed
+20 -17

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ func (c *Checker) checkType(n *a.Node) error {
return nil
}
// TODO: see if n.ID1 refers to a struct type.
return fmt.Errorf("check: %q is not a type", c.idMap.ByKey(n.ID1.Key()))
return fmt.Errorf("check: %q is not a type", c.idMap.ByID(n.ID1))
case t.IDPtr:
n = n.RHS