mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
lang/check: tighten checkConstElement constraint
This commit is contained in:
1 parent
4834cb97c8
commit
95630b6677
1 file changed
+1
-1
+1
-1
@@ -405,7 +405,7 @@ func (c *Checker) checkConst(node *a.Node) error {
|
||||
func (c *Checker) checkConstElement(typ *a.TypeExpr, n *a.Expr, nb bounds, nLists int) error {
|
||||
if nLists > 0 {
|
||||
nLists--
|
||||
if !typ.IsEitherArrayType() {
|
||||
if typ.Decorator() != t.IDRoarray {
|
||||
return fmt.Errorf("internal error: inconsistent element type %q", typ.Str(c.tm))
|
||||
}
|
||||
cv := typ.ArrayLength().ConstValue()
|
||||
|
||||
Reference in new issue
Block a user