Rename ast.Node methods from Foo to AsFoo

This commit is contained in:
Nigel Tao committed 2018-07-01 20:41:21 +10:00
1 parent 12773ce74a
commit ccb78f5db7
21 files changed
+461 -458

No files matched your search

+3 -3
View File
@@ -132,9 +132,9 @@ func (c *Checker) parseBuiltInFuncs(ss []string, generic bool) (map[t.QQID]*a.Fu
if len(tlds) != 1 || tlds[0].Kind() != a.KFunc {
return nil, fmt.Errorf("check: parsing %q: got %d top level decls, want %d", s, len(tlds), 1)
}
f := tlds[0].Func()
f.Node().Raw().SetPackage(c.tm, t.IDBase)
if err := c.checkFuncSignature(f.Node()); err != nil {
f := tlds[0].AsFunc()
f.AsNode().AsRaw().SetPackage(c.tm, t.IDBase)
if err := c.checkFuncSignature(f.AsNode()); err != nil {
return nil, err
}