Forbid String:cell in structs.
authorDavid Anderson <dvander@alliedmods.net>
Sun Aug 05 01:24:46 2012 -0700 (2012-08-05)
changeset 159d515dceb12f9
parent 158 91071a2255bf
child 160 12807399b953
Forbid String:cell in structs.
src/SemanticAnalysis.cpp
     1.1 --- a/src/SemanticAnalysis.cpp	Sun Aug 05 01:15:35 2012 -0700
     1.2 +++ b/src/SemanticAnalysis.cpp	Sun Aug 05 01:24:46 2012 -0700
     1.3 @@ -1280,6 +1280,11 @@
     1.4          if (!type)
     1.5              return;
     1.6  
     1.7 +        if (type->isPrimitive() && type->primitive() == PrimitiveType_Char) {
     1.8 +            cc_.reportError(field->pos(), Message_CannotDeclareStringCell);
     1.9 +            return;
    1.10 +        }
    1.11 +
    1.12          unsigned offset;
    1.13          if (!builder.add(type, &offset))
    1.14              return;