mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
lang: change const array to const roarray
This commit is contained in:
1 parent
f3caf09d77
commit
ea3fbc37f5
11 files changed
+42
-42
No files matched your search
+2
-2
@@ -375,14 +375,14 @@ func (c *Checker) checkConst(node *a.Node) error {
|
||||
|
||||
nLists := 0
|
||||
for elemTyp := typ; ; {
|
||||
if elemTyp.IsEitherArrayType() {
|
||||
if dec := elemTyp.Decorator(); dec == t.IDRoarray {
|
||||
if nLists == a.MaxTypeExprDepth {
|
||||
return fmt.Errorf("check: type expression recursion depth too large")
|
||||
}
|
||||
nLists++
|
||||
elemTyp = elemTyp.Inner()
|
||||
continue
|
||||
} else if elemTyp.Decorator() != 0 {
|
||||
} else if dec != 0 {
|
||||
return fmt.Errorf("check: invalid const type %q for %s", n.XType().Str(c.tm), qid.Str(c.tm))
|
||||
}
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user