compiler/libec: Added support to call virtual methods on string literals/char *
authorJerome St-Louis <jerome@ecere.com>
Sun, 5 May 2013 21:36:08 +0000 (17:36 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sun, 5 May 2013 21:36:08 +0000 (17:36 -0400)
compiler/bootstrap/libec/bootstrap/pass15.c
compiler/libec/src/pass15.ec

index 65aa45f..adb3cf9 100644 (file)
@@ -14072,7 +14072,7 @@ type = ProcessTemplateParameterType(type->templateParameter);
 }
 if(type && (type->kind == 20))
 ;
-else if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15 || type->kind == 4 || type->kind == 2 || type->kind == 5 || type->kind == 1 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7))
+else if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15 || type->kind == 4 || type->kind == 2 || type->kind == 5 || type->kind == 1 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->type->kind == 1)))
 {
 struct Identifier * id = exp->member.member;
 int typeKind = type->kind;
index c91aba2..6da98a8 100644 (file)
@@ -9239,7 +9239,8 @@ void ProcessExpressionType(Expression exp)
          if(type && (type.kind == templateType));
          else if(type && (type.kind == classType || type.kind == subClassType || type.kind == intType || type.kind == enumType ||
                           type.kind == int64Type || type.kind == shortType || type.kind == longType || type.kind == charType ||
-                          type.kind == intPtrType || type.kind == intSizeType || type.kind == floatType || type.kind == doubleType))
+                          type.kind == intPtrType || type.kind == intSizeType || type.kind == floatType || type.kind == doubleType ||
+                          (type.kind == pointerType && type.type.kind == charType)))
          {
             Identifier id = exp.member.member;
             TypeKind typeKind = type.kind;