check: add maxPointerBounds and funcBounds

This commit is contained in:
Nigel Tao committed 2023-06-13 11:52:16 +10:00
1 parent 8ac22ceab2
commit 6411561deb
3 files changed
+20 -6

No files matched your search

+1 -1
View File
@@ -648,7 +648,7 @@ func (c *Checker) checkFuncSignature1(node *a.Node, banCPUArchTypes bool) error
sTyp.AsNode().SetMType(typeExprTypeExpr)
pTyp := a.NewTypeExpr(t.IDPtr, 0, 0, nil, nil, sTyp)
pTyp.AsNode().SetMBounds(bounds{one, one})
pTyp.AsNode().SetMBounds(bounds{one, maxPointerBounds})
pTyp.AsNode().SetMType(typeExprTypeExpr)
localVars[t.IDThis] = pTyp