cgen: allow "var x : nptr array[etc] etc"

This commit is contained in:
Nigel Tao committed 2023-06-13 10:49:37 +10:00
1 parent dfab0d2b3d
commit 8ac22ceab2
7 files changed
+84 -31

No files matched your search

+1 -1
View File
@@ -860,7 +860,7 @@ func (n *TypeExpr) BulkSize() *big.Int {
}
func (n *TypeExpr) IsBulkNumType() bool {
for ; n.id0 == t.IDArray; n = n.rhs.AsTypeExpr() {
for ; (n.id0 == t.IDArray) || (n.id0 == t.IDRoarray); n = n.rhs.AsTypeExpr() {
}
return n.id0 == 0 && n.id1 == t.IDBase && n.id2.IsNumType()
}