Make every expression have non-nil bounds

This commit is contained in:
Nigel Tao committed 2018-07-07 17:36:05 +10:00
1 parent 971e173721
commit a506657c53
2 files changed
+42 -64

No files matched your search

+1 -1
View File
@@ -362,7 +362,7 @@ func (c *Checker) checkConst(node *a.Node) error {
if typ.Decorator() != 0 {
return fmt.Errorf("check: invalid const type %q for %s", n.XType().Str(c.tm), qid.Str(c.tm))
}
nb, err := q.bcheckTypeExpr(typ)
nb, err := typeBounds(q.tm, typ)
if err != nil {
return err
}