First cut of a bounds checker.

This commit is contained in:
Nigel Tao committed 2017-05-18 13:37:46 +10:00
1 parent 15485dadc1
commit a8c304236d
6 files changed
+148 -31

No files matched your search

+5
View File
@@ -551,6 +551,11 @@ func (c *typeChecker) checkTypeExpr(n *a.TypeExpr, depth uint32) error {
}
default:
// TODO: delete this hack.
if n.PackageOrDecorator() == c.idMap.ByName("io") && n.Name() == c.idMap.ByName("buf1") {
break
}
return fmt.Errorf("check: unrecognized node for checkTypeExpr")
}
n.Node().SetTypeChecked()