Make an ast.TypeExpr's ID0 field more consistent

This commit is contained in:
Nigel Tao committed 2018-04-20 16:21:16 +10:00
1 parent 90a794c0b8
commit 4ddc2f0055
5 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -134,7 +134,7 @@ func parseBuiltInFuncs(tm *t.Map, ss []string, generic bool) (map[t.QQID]*a.Func
}
func (c *Checker) resolveFunc(typ *a.TypeExpr) (*a.Func, error) {
if typ.Decorator() != t.IDOpenParen {
if typ.Decorator() != t.IDFunc {
return nil, fmt.Errorf("check: resolveFunc cannot look up non-func TypeExpr %q", typ.Str(c.tm))
}
lTyp := typ.Receiver()