src/SemanticAnalysis.cpp
changeset 192 23a804fa1d3e
parent 191 9d17f29fe16a
child 194 b029d63565a2
     1.1 --- a/src/SemanticAnalysis.cpp	Sun Sep 16 22:49:54 2012 -0700
     1.2 +++ b/src/SemanticAnalysis.cpp	Sun Sep 16 23:15:13 2012 -0700
     1.3 @@ -1760,7 +1760,16 @@
     1.4          if (!type)
     1.5              return;
     1.6  
     1.7 -        if (type->isPrimitive() && type->primitive() == PrimitiveType_Char) {
     1.8 +        if (field->dimensions()) {
     1.9 +            type = buildArrayType(type, field->dimensions(), false);
    1.10 +            if (!type)
    1.11 +                return;
    1.12 +
    1.13 +            if (!ArrayMap::Attach(zone_, type))
    1.14 +                return;
    1.15 +        }
    1.16 +
    1.17 +        if (IsScalarString(type)) {
    1.18              cc_.reportError(field->pos(), Message_CannotDeclareStringCell);
    1.19              return;
    1.20          }