diff --git a/lang/check/check.go b/lang/check/check.go index 208b6dc3..85dd23e7 100644 --- a/lang/check/check.go +++ b/lang/check/check.go @@ -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()