compiler/libec: (#307, #70) Warning on undeclared class; Overriding namespaces
[sdk] / compiler / bootstrap / libec / bootstrap / pass15.c
index 7600171..36a8ef3 100644 (file)
@@ -761,14 +761,6 @@ int importType;
 int importAccess;
 } __attribute__ ((gcc_struct));
 
-struct Declaration;
-
-extern struct External * MkExternalDeclaration(struct Declaration * declaration);
-
-extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
-
-static void ProcessDeclaration(struct Declaration * decl);
-
 struct __ecereNameSpace__ecere__com__NameSpace;
 
 extern struct __ecereNameSpace__ecere__com__NameSpace *  globalData;
@@ -849,6 +841,12 @@ struct __ecereNameSpace__ecere__sys__OldLink * next;
 void *  data;
 } __attribute__ ((gcc_struct));
 
+struct Declaration;
+
+extern struct External * MkExternalDeclaration(struct Declaration * declaration);
+
+extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
+
 struct Specifier;
 
 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
@@ -1683,6 +1681,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
 struct Context * ctx;
 int isIterator;
 struct Expression * propCategory;
+unsigned int mustRegister;
 } __attribute__ ((gcc_struct));
 
 struct __ecereNameSpace__ecere__com__ClassProperty;
@@ -1851,6 +1850,7 @@ struct ExtDecl * extDecl;
 char *  name;
 struct Symbol * symbol;
 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
+struct Specifier * nsSpec;
 } __attribute__ ((gcc_struct)) __anon1;
 struct
 {
@@ -13846,7 +13846,7 @@ if(computedExp != sourceExp)
 FreeExpression(computedExp);
 computedExp = sourceExp;
 }
-if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "ecere::com::unichar"))
+if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
 {
 FreeType(source);
 source = __extension__ ({
@@ -14495,3045 +14495,2810 @@ break;
 }
 }
 
-static void ProcessStatement(struct Statement * stmt)
+static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList *  definitions, struct Symbol *  symbol);
+
+static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
 {
-yylloc = stmt->loc;
-switch(stmt->type)
+switch(spec->type)
 {
 case 0:
-ProcessStatement(stmt->__anon1.labeled.stmt);
+{
+if(spec->__anon1.specifier == THISCLASS)
+{
+if(thisClass)
+{
+spec->type = 1;
+spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
+spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
+ProcessSpecifier(spec, declareStruct, 0);
+}
+}
 break;
+}
 case 1:
-if(stmt->__anon1.caseStmt.exp)
 {
-FreeType(stmt->__anon1.caseStmt.exp->destType);
-stmt->__anon1.caseStmt.exp->destType = curSwitchType;
-if(curSwitchType)
-curSwitchType->refCount++;
-ProcessExpressionType(stmt->__anon1.caseStmt.exp);
-ComputeExpression(stmt->__anon1.caseStmt.exp);
+struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
+
+if(symbol)
+DeclareType(curExternal, symbol->type, 1, 1);
+else if(spec->__anon1.__anon1.symbol)
+{
+struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
+
+if(warnClasses && !c)
+Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
+DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
 }
-if(stmt->__anon1.caseStmt.stmt)
-ProcessStatement(stmt->__anon1.caseStmt.stmt);
 break;
+}
 case 2:
 {
-if(stmt->__anon1.compound.context)
-{
-struct Declaration * decl;
-struct Statement * s;
-struct Statement * prevCompound = curCompound;
-struct Context * prevContext = curContext;
+struct Enumerator * e;
 
-if(!stmt->__anon1.compound.isSwitch)
-curCompound = stmt;
-curContext = stmt->__anon1.compound.context;
-if(stmt->__anon1.compound.declarations)
+if(spec->__anon1.__anon2.list)
 {
-for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
-ProcessDeclaration(decl);
-}
-if(stmt->__anon1.compound.statements)
+for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
 {
-for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
-ProcessStatement(s);
+if(e->exp)
+ProcessExpressionType(e->exp);
 }
-curContext = prevContext;
-curCompound = prevCompound;
 }
+if(inCompiler)
 break;
 }
 case 3:
+case 4:
 {
-struct Expression * exp;
-
-if(stmt->__anon1.expressions)
+if(spec->__anon1.__anon2.definitions)
 {
-for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
-ProcessExpressionType(exp);
+struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
+
+ProcessClass(spec->__anon1.__anon2.definitions, symbol);
 }
 break;
 }
-case 4:
-{
-struct Expression * exp;
-
-FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
-((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
-((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
-for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
-{
-ProcessExpressionType(exp);
 }
-if(stmt->__anon1.ifStmt.stmt)
-ProcessStatement(stmt->__anon1.ifStmt.stmt);
-if(stmt->__anon1.ifStmt.elseStmt)
-ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
-break;
 }
-case 5:
-{
-struct Type * oldSwitchType = curSwitchType;
 
-if(stmt->__anon1.switchStmt.exp)
+static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
 {
-struct Expression * exp;
-
-for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
+switch(decl->type)
 {
-if(!exp->next)
+case 1:
+if(decl->__anon1.identifier->classSym)
 {
-ProcessExpressionType(exp);
-}
-if(!exp->next)
-curSwitchType = exp->expType;
-}
+FreeSpecifier(decl->__anon1.identifier->_class);
+decl->__anon1.identifier->_class = (((void *)0));
 }
-ProcessStatement(stmt->__anon1.switchStmt.stmt);
-curSwitchType = oldSwitchType;
 break;
-}
+case 3:
+if(decl->__anon1.array.exp)
+ProcessExpressionType(decl->__anon1.array.exp);
+case 0:
+case 2:
+case 4:
+case 5:
 case 6:
+case 7:
 {
-if(stmt->__anon1.whileStmt.exp)
-{
-struct Expression * exp;
+struct Identifier * id = (((void *)0));
+struct Specifier * classSpec = (((void *)0));
 
-FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
-((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
-((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
-for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
+if(decl->type == 4)
 {
-ProcessExpressionType(exp);
+id = GetDeclId(decl);
+if(id && id->_class)
+{
+classSpec = id->_class;
+id->_class = (((void *)0));
 }
 }
-if(stmt->__anon1.whileStmt.stmt)
-ProcessStatement(stmt->__anon1.whileStmt.stmt);
-break;
+if(decl->declarator)
+ProcessDeclarator(decl->declarator, isFunction);
+if(decl->type == 4)
+{
+if(classSpec)
+{
+struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
+
+if(!decl->__anon1.function.parameters)
+decl->__anon1.function.parameters = MkList();
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
 }
-case 7:
+if(decl->__anon1.function.parameters)
 {
-if(stmt->__anon1.doWhile.exp)
+struct TypeName * param;
+
+for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
 {
-struct Expression * exp;
+if(param->qualifiers)
+{
+struct Specifier * spec;
 
-if((*stmt->__anon1.doWhile.exp).last)
+for(spec = (*param->qualifiers).first; spec; spec = spec->next)
 {
-FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
-((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
-((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
-}
-for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
+if(spec->type == 0)
 {
-ProcessExpressionType(exp);
-}
-}
-if(stmt->__anon1.doWhile.stmt)
-ProcessStatement(stmt->__anon1.doWhile.stmt);
+if(spec->__anon1.specifier == TYPED_OBJECT)
+{
+struct Declarator * d = param->declarator;
+struct TypeName * newParam = (newParam = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), newParam->qualifiers = MkListOne(MkSpecifier(VOID)), newParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d), newParam);
+
+if(d->type != 5)
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
+FreeList(param->qualifiers, (void *)(FreeSpecifier));
+param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
+param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
+DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
+param = newParam;
 break;
 }
-case 8:
+else if(spec->__anon1.specifier == ANY_OBJECT)
 {
-struct Expression * exp;
+struct Declarator * d = param->declarator;
 
-if(stmt->__anon1.forStmt.init)
-ProcessStatement(stmt->__anon1.forStmt.init);
-if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
-{
-FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
-((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
-((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
+FreeList(param->qualifiers, (void *)(FreeSpecifier));
+param->qualifiers = MkListOne(MkSpecifier(VOID));
+if(d->type != 5)
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
+param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
+break;
 }
-if(stmt->__anon1.forStmt.check)
-ProcessStatement(stmt->__anon1.forStmt.check);
-if(stmt->__anon1.forStmt.increment)
+else if(spec->__anon1.specifier == THISCLASS)
 {
-for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
-ProcessExpressionType(exp);
+if(thisClass)
+{
+spec->type = 1;
+spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
+spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
+ProcessSpecifier(spec, 0, 0);
 }
-if(stmt->__anon1.forStmt.stmt)
-ProcessStatement(stmt->__anon1.forStmt.stmt);
 break;
 }
-case 18:
+}
+else if(spec->type == 1)
 {
-struct Identifier * id = stmt->__anon1.forEachStmt.id;
-struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
-struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
-struct Statement * block = stmt->__anon1.forEachStmt.stmt;
-char iteratorType[1024];
-struct Type * source;
-struct Expression * e;
-unsigned int isBuiltin = exp && (*exp).last && (((struct Expression *)(*exp).last)->type == 35 || (((struct Expression *)(*exp).last)->type == 11 && ((struct Expression *)(*exp).last)->__anon1.cast.exp->type == 35));
-struct Expression * arrayExp;
-const char * typeString = (((void *)0));
-int builtinCount = 0;
+ProcessSpecifier(spec, isFunction, 1);
+}
+}
+}
+if(param->declarator)
+ProcessDeclarator(param->declarator, 0);
+}
+}
+}
+break;
+}
+}
+}
 
-for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
+static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
 {
-if(!e->next)
+yylloc = decl->loc;
+switch(decl->type)
 {
-FreeType(e->destType);
-e->destType = ProcessTypeString("Container", 0);
-}
-if(!isBuiltin || e->next)
-ProcessExpressionType(e);
-}
-source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
-if(isBuiltin || (source && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, containerClass)))
+case 1:
 {
-struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
-struct Symbol * symbol;
-struct Expression * expIt = (((void *)0));
-unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
-struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
-struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
-struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
+unsigned int declareStruct = 0;
 
-if(inCompiler)
-{
-stmt->type = 2;
-stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
-stmt->__anon1.compound.context->parent = curContext;
-curContext = stmt->__anon1.compound.context;
-}
-if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
+if(decl->__anon1.__anon1.declarators)
 {
-struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
+struct InitDeclarator * d;
 
-isCustomAVLTree = 1;
-if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
-isMap = 1;
-}
-else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
-isArray = 1;
-else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
 {
-struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
+struct Type * type, * subType;
 
-isLinkList = 1;
-isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
-}
-if(inCompiler && isArray)
+ProcessDeclarator(d->declarator, 0);
+type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
+if(d->initializer)
 {
-struct Declarator * decl;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-
-decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
-stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
-ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
-}
-else if(isBuiltin)
+ProcessInitializer(d->initializer, type);
+if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
 {
-struct Type * type = (((void *)0));
-char typeStringBuf[1024];
-
-arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
-if(((struct Expression *)(*exp).last)->type == 11)
+if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
 {
-struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
+struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
 
-if(typeName)
-arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
+inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
+d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
+if(decl->__anon1.__anon1.specifiers)
+FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
+FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
+d = (((void *)0));
+decl->type = 2;
+decl->__anon1.inst = inst;
 }
-if(arrayExp->destType && arrayExp->destType->kind == 8 && arrayExp->destType->__anon1._class && arrayExp->destType->__anon1._class->__anon1.registered && arrayExp->destType->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(arrayExp->destType->__anon1._class->__anon1.registered, containerClass) && arrayExp->destType->__anon1._class->__anon1.registered->templateArgs)
+}
+}
+for(subType = type; subType; )
 {
-struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
-
-typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
+if(subType->kind == 8)
+{
+declareStruct = 1;
+break;
 }
-else if(arrayExp->__anon1.list)
+else if(subType->kind == 13)
+break;
+else if(subType->kind == 12)
+subType = subType->__anon1.__anon4.arrayType;
+else
+break;
+}
+FreeType(type);
+if(!d)
+break;
+}
+}
+if(decl->__anon1.__anon1.specifiers)
 {
-struct Expression * e;
+struct Specifier * s;
 
-for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
-{
-ProcessExpressionType(e);
-if(e->expType)
+for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
 {
-if(!type)
+ProcessSpecifier(s, declareStruct, 1);
+}
+}
+break;
+}
+case 2:
 {
-type = e->expType;
-type->refCount++;
+ProcessInstantiationType(decl->__anon1.inst);
+break;
 }
-else
+case 0:
 {
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+struct Specifier * spec;
+struct Declarator * d;
+unsigned int declareStruct = 0;
+
+if(decl->__anon1.__anon1.declarators)
 {
-FreeType(type);
-type = e->expType;
-e->expType = (((void *)0));
-e = (*arrayExp->__anon1.list).first;
-ProcessExpressionType(e);
-if(e->expType)
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
 {
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
+struct Type * subType;
+
+ProcessDeclarator(d, 0);
+for(subType = type; subType; )
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
-FreeType(type);
-type = (((void *)0));
+if(subType->kind == 8)
+{
+declareStruct = 1;
 break;
 }
+else if(subType->kind == 13)
+break;
+else if(subType->kind == 12)
+subType = subType->__anon1.__anon4.arrayType;
+else
+break;
 }
+FreeType(type);
 }
 }
-if(e->expType)
+if(decl->__anon1.__anon1.specifiers)
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
+for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
+ProcessSpecifier(spec, declareStruct, warnClasses);
 }
+break;
 }
 }
-if(type)
-{
-typeStringBuf[0] = '\0';
-PrintType(type, typeStringBuf, 0, 1);
-typeString = typeStringBuf;
-FreeType(type);
 }
+
+static void ProcessStatement(struct Statement * stmt)
+{
+yylloc = stmt->loc;
+switch(stmt->type)
+{
+case 0:
+ProcessStatement(stmt->__anon1.labeled.stmt);
+break;
+case 1:
+if(stmt->__anon1.caseStmt.exp)
+{
+FreeType(stmt->__anon1.caseStmt.exp->destType);
+stmt->__anon1.caseStmt.exp->destType = curSwitchType;
+if(curSwitchType)
+curSwitchType->refCount++;
+ProcessExpressionType(stmt->__anon1.caseStmt.exp);
+ComputeExpression(stmt->__anon1.caseStmt.exp);
 }
-if(typeString)
+if(stmt->__anon1.caseStmt.stmt)
+ProcessStatement(stmt->__anon1.caseStmt.stmt);
+break;
+case 2:
 {
-if(inCompiler)
+if(stmt->__anon1.compound.context)
 {
-struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
-struct Declarator * decl;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declaration * decl;
+struct Statement * s;
+struct Statement * prevCompound = curCompound;
+struct Context * prevContext = curContext;
 
-if(arrayExp->__anon1.list)
+if(!stmt->__anon1.compound.isSwitch)
+curCompound = stmt;
+curContext = stmt->__anon1.compound.context;
+if(stmt->__anon1.compound.declarations)
 {
-struct Expression * e;
-
-builtinCount = (*arrayExp->__anon1.list).count;
-type = ProcessTypeString(typeString, 0);
-while((e = (*arrayExp->__anon1.list).first))
+for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
+ProcessDeclaration(decl, 1);
+}
+if(stmt->__anon1.compound.statements)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
-e->destType = type;
-type->refCount++;
-ProcessExpressionType(e);
-if(inCompiler)
-ListAdd(initializers, MkInitializerAssignment(e));
+for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
+ProcessStatement(s);
 }
-FreeType(type);
-(__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
+curContext = prevContext;
+curCompound = prevCompound;
 }
-decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
-stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
-ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
-FreeList(exp, (void *)(FreeExpression));
+break;
 }
-else if(arrayExp->__anon1.list)
+case 3:
 {
-struct Expression * e;
+struct Expression * exp;
 
-type = ProcessTypeString(typeString, 0);
-for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
+if(stmt->__anon1.expressions)
 {
-e->destType = type;
-type->refCount++;
-ProcessExpressionType(e);
-}
-FreeType(type);
+for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
+ProcessExpressionType(exp);
 }
+break;
 }
-else
+case 4:
 {
-arrayExp->expType = ProcessTypeString("Container", 0);
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
+struct Expression * exp;
+
+FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
+((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
+((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
+for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
+{
+ProcessExpressionType(exp);
 }
+if(stmt->__anon1.ifStmt.stmt)
+ProcessStatement(stmt->__anon1.ifStmt.stmt);
+if(stmt->__anon1.ifStmt.elseStmt)
+ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
+break;
 }
-else if(inCompiler && isLinkList && !isList)
+case 5:
 {
-struct Declarator * decl;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Type * oldSwitchType = curSwitchType;
 
-decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
-stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
-ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
-}
-else if(inCompiler && _class->templateArgs)
-{
-if(isMap)
-sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
-else
-sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
-stmt->__anon1.compound.declarations = MkListOne(MkDeclarationInst(MkInstantiationNamed(MkListOne(MkSpecifierName(iteratorType)), MkExpIdentifier(id), MkListOne(MkMembersInitList(MkListOne(MkMemberInit(isMap ? MkListOne(MkIdentifier("map")) : (((void *)0)), MkInitializerAssignment(MkExpBrackets(exp)))))))));
-}
-if(inCompiler)
+if(stmt->__anon1.switchStmt.exp)
 {
-symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
-if(block)
+struct Expression * exp;
+
+for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
 {
-switch(block->type)
+if(!exp->next)
 {
-case 2:
-if(block->__anon1.compound.context)
-block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-case 4:
-if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
-block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
-block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-case 5:
-if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
-block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-case 6:
-if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
-block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-case 7:
-if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
-block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-case 8:
-if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
-block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-case 18:
-if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
-block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
-break;
-}
+ProcessExpressionType(exp);
 }
-if(filter)
-{
-block = MkIfStmt(filter, block, (((void *)0)));
+if(!exp->next)
+curSwitchType = exp->expType;
 }
-if(isArray)
-{
-stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("array"))))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '<', MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("array")), '+', MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("count")))))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), INC_OP, (((void *)0)))), block));
-ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
-ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
-ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
 }
-else if(isBuiltin)
-{
-char count[128];
-
-sprintf(count, "%d", builtinCount);
-stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpIdentifier(MkIdentifier("__internalArray"))))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '<', MkExpOp(MkExpIdentifier(MkIdentifier("__internalArray")), '+', MkExpConstant(count))))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), INC_OP, (((void *)0)))), block));
-ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
-ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
-ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
+ProcessStatement(stmt->__anon1.switchStmt.stmt);
+curSwitchType = oldSwitchType;
+break;
 }
-else if(isLinkList && !isList)
-{
-struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
-struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
-
-if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
+case 6:
 {
-stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("next")))), block));
-}
-else
+if(stmt->__anon1.whileStmt.exp)
 {
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
+struct Expression * exp;
 
-stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpCast(MkTypeName(specs, decl), MkExpCall(MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("GetNext")), MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("IteratorPointer")), (((void *)0))), MkExpIdentifier(CopyIdentifier(id)))))))), block));
-}
-ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
-ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
-ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
-}
-else
+FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
+((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
+((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
+for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
 {
-stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
+ProcessExpressionType(exp);
 }
-ProcessExpressionType(expIt);
-if((*stmt->__anon1.compound.declarations).first)
-ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
-if(symbol)
-symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
-ProcessStatement(stmt);
 }
-else
-ProcessStatement(stmt->__anon1.forEachStmt.stmt);
-if(inCompiler)
-curContext = stmt->__anon1.compound.context->parent;
+if(stmt->__anon1.whileStmt.stmt)
+ProcessStatement(stmt->__anon1.whileStmt.stmt);
 break;
 }
-else
+case 7:
 {
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
-}
-break;
-}
-case 9:
-break;
-case 10:
-break;
-case 11:
-break;
-case 12:
+if(stmt->__anon1.doWhile.exp)
 {
 struct Expression * exp;
 
-if(stmt->__anon1.expressions)
-{
-for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
-{
-if(!exp->next)
+if((*stmt->__anon1.doWhile.exp).last)
 {
-if(curFunction && !curFunction->type)
-curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
-FreeType(exp->destType);
-exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
-if(exp->destType)
-exp->destType->refCount++;
+FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
+((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
+((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
 }
+for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
+{
 ProcessExpressionType(exp);
 }
 }
+if(stmt->__anon1.doWhile.stmt)
+ProcessStatement(stmt->__anon1.doWhile.stmt);
 break;
 }
-case 14:
-{
-ProcessDeclaration(stmt->__anon1.decl);
-break;
-}
-case 13:
+case 8:
 {
-struct AsmField * field;
+struct Expression * exp;
 
-if(stmt->__anon1.asmStmt.inputFields)
+if(stmt->__anon1.forStmt.init)
+ProcessStatement(stmt->__anon1.forStmt.init);
+if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
 {
-for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
-if(field->expression)
-ProcessExpressionType(field->expression);
+FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
+((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
+((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
 }
-if(stmt->__anon1.asmStmt.outputFields)
+if(stmt->__anon1.forStmt.check)
+ProcessStatement(stmt->__anon1.forStmt.check);
+if(stmt->__anon1.forStmt.increment)
 {
-for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
-if(field->expression)
-ProcessExpressionType(field->expression);
+for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
+ProcessExpressionType(exp);
 }
-if(stmt->__anon1.asmStmt.clobberedFields)
+if(stmt->__anon1.forStmt.stmt)
+ProcessStatement(stmt->__anon1.forStmt.stmt);
+break;
+}
+case 18:
 {
-for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
+struct Identifier * id = stmt->__anon1.forEachStmt.id;
+struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
+struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
+struct Statement * block = stmt->__anon1.forEachStmt.stmt;
+char iteratorType[1024];
+struct Type * source;
+struct Expression * e;
+unsigned int isBuiltin = exp && (*exp).last && (((struct Expression *)(*exp).last)->type == 35 || (((struct Expression *)(*exp).last)->type == 11 && ((struct Expression *)(*exp).last)->__anon1.cast.exp->type == 35));
+struct Expression * arrayExp;
+const char * typeString = (((void *)0));
+int builtinCount = 0;
+
+for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
 {
-if(field->expression)
-ProcessExpressionType(field->expression);
-}
+if(!e->next)
+{
+FreeType(e->destType);
+e->destType = ProcessTypeString("Container", 0);
 }
-break;
+if(!isBuiltin || e->next)
+ProcessExpressionType(e);
 }
-case 17:
+source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
+if(isBuiltin || (source && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, containerClass)))
 {
-struct PropertyWatch * propWatch;
-struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
-struct Expression * object = stmt->__anon1._watch.object;
-struct Expression * watcher = stmt->__anon1._watch.watcher;
+struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
+struct Symbol * symbol;
+struct Expression * expIt = (((void *)0));
+unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
+struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
+struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
+struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
 
-if(watcher)
-ProcessExpressionType(watcher);
-if(object)
-ProcessExpressionType(object);
 if(inCompiler)
 {
-if(watcher || thisClass)
-{
-struct External * external = curExternal;
-struct Context * context = curContext;
-
-stmt->type = 3;
-stmt->__anon1.expressions = MkList();
-for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
+stmt->type = 2;
+stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
+stmt->__anon1.compound.context->parent = curContext;
+curContext = stmt->__anon1.compound.context;
+}
+if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
 {
-struct ClassFunction * func;
-char watcherName[1024];
-struct __ecereNameSpace__ecere__com__Class * watcherClass = watcher ? ((watcher->expType && watcher->expType->kind == 8 && watcher->expType->__anon1._class) ? watcher->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
-struct External * createdExternal;
+struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
 
-sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
-if(propWatch->deleteWatch)
-strcat(watcherName, "_delete");
-else
+isCustomAVLTree = 1;
+if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
+isMap = 1;
+}
+else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
+isArray = 1;
+else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
 {
-struct Identifier * propID;
+struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
 
-for(propID = (*propWatch->properties).first; propID; propID = propID->next)
-{
-strcat(watcherName, "_");
-strcat(watcherName, propID->string);
+isLinkList = 1;
+isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
 }
+if(inCompiler && isArray)
+{
+struct Declarator * decl;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+
+decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
+stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
+ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
 }
-if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
+else if(isBuiltin)
 {
-func = MkClassFunction(MkListOne(MkSpecifier(VOID)), (((void *)0)), MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifierName(object->expType->__anon1._class->string)), MkDeclaratorIdentifier(MkIdentifier("value"))))), (((void *)0)));
-ProcessClassFunctionBody(func, propWatch->compound);
-propWatch->compound = (((void *)0));
-createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
-curExternal = createdExternal;
-ProcessFunction(createdExternal->__anon1.function);
-if(propWatch->deleteWatch)
+struct Type * type = (((void *)0));
+char typeStringBuf[1024];
+
+arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
+if(((struct Expression *)(*exp).last)->type == 11)
 {
-struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
+struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
 
-ListAdd(args, CopyExpression(object));
-ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
-ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
-ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
+if(typeName)
+arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
 }
-else
+if(arrayExp->destType && arrayExp->destType->kind == 8 && arrayExp->destType->__anon1._class && arrayExp->destType->__anon1._class->__anon1.registered && arrayExp->destType->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(arrayExp->destType->__anon1._class->__anon1.registered, containerClass) && arrayExp->destType->__anon1._class->__anon1.registered->templateArgs)
 {
-struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
-struct Identifier * propID;
+struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
 
-for(propID = (*propWatch->properties).first; propID; propID = propID->next)
+typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
+}
+else if(arrayExp->__anon1.list)
 {
-char propName[1024];
-struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
+struct Expression * e;
 
-if(prop)
+for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
 {
-char getName[1024], setName[1024];
-struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
-
-DeclareProperty(createdExternal, prop, setName, getName);
-strcpy(propName, "__ecereProp_");
-FullClassNameCat(propName, prop->_class->fullName, 0);
-strcat(propName, "_");
-FullClassNameCat(propName, prop->name, 1);
-ListAdd(args, CopyExpression(object));
-ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
-ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
-ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
-ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
-__ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
+ProcessExpressionType(e);
+if(e->expType)
+{
+if(!type)
+{
+type = e->expType;
+type->refCount++;
 }
 else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
+{
+if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+{
+FreeType(type);
+type = e->expType;
+e->expType = (((void *)0));
+e = (*arrayExp->__anon1.list).first;
+ProcessExpressionType(e);
+if(e->expType)
+{
+if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+{
+FreeType(e->expType);
+e->expType = (((void *)0));
+FreeType(type);
+type = (((void *)0));
+break;
 }
 }
 }
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
 }
-curExternal = external;
-curContext = context;
-if(watcher)
-FreeExpression(watcher);
-if(object)
-FreeExpression(object);
-FreeList(watches, (void *)(FreePropertyWatch));
+if(e->expType)
+{
+FreeType(e->expType);
+e->expType = (((void *)0));
 }
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
 }
-else
-{
-for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
-{
-ProcessStatement(propWatch->compound);
 }
+if(type)
+{
+typeStringBuf[0] = '\0';
+PrintType(type, typeStringBuf, 0, 1);
+typeString = typeStringBuf;
+FreeType(type);
 }
-break;
 }
-case 15:
+if(typeString)
 {
-struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
-struct Expression * object = stmt->__anon1._watch.object;
-struct __ecereNameSpace__ecere__com__Class * _class;
-
-if(object)
-ProcessExpressionType(object);
 if(inCompiler)
 {
-_class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
-if(_class)
-{
-struct Identifier * propID;
+struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
+struct Declarator * decl;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
 
-stmt->type = 3;
-stmt->__anon1.expressions = MkList();
-if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
-{
-watches = MkListOne(MkIdentifier(curFunction->propSet->string));
-}
-else if(!watches)
-{
-}
-if(watches)
-{
-for(propID = (*watches).first; propID; propID = propID->next)
+if(arrayExp->__anon1.list)
 {
-struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
+struct Expression * e;
 
-if(prop)
+builtinCount = (*arrayExp->__anon1.list).count;
+type = ProcessTypeString(typeString, 0);
+while((e = (*arrayExp->__anon1.list).first))
 {
-CreateFireWatcher(prop, object, stmt);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
+e->destType = type;
+type->refCount++;
+ProcessExpressionType(e);
+if(inCompiler)
+ListAdd(initializers, MkInitializerAssignment(e));
 }
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
+FreeType(type);
+(__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
 }
+decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
+stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
+ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
+FreeList(exp, (void *)(FreeExpression));
 }
-else
+else if(arrayExp->__anon1.list)
 {
-struct __ecereNameSpace__ecere__com__Property * prop;
-struct __ecereNameSpace__ecere__com__Class * base;
+struct Expression * e;
 
-for(base = _class; base; base = base->base)
-{
-for(prop = base->membersAndProperties.first; prop; prop = prop->next)
-{
-if(prop->isProperty && prop->isWatchable)
+type = ProcessTypeString(typeString, 0);
+for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
 {
-CreateFireWatcher(prop, object, stmt);
-}
-}
+e->destType = type;
+type->refCount++;
+ProcessExpressionType(e);
 }
+FreeType(type);
 }
-if(object)
-FreeExpression(object);
-FreeList(watches, (void *)(FreeIdentifier));
 }
 else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
+{
+arrayExp->expType = ProcessTypeString("Container", 0);
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
 }
-break;
 }
-case 16:
-{
-struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
-struct Expression * object = stmt->__anon1._watch.object;
-struct Expression * watcher = stmt->__anon1._watch.watcher;
-struct __ecereNameSpace__ecere__com__Class * _class;
-
-if(object)
-ProcessExpressionType(object);
-if(watcher)
-ProcessExpressionType(watcher);
-if(inCompiler)
-{
-_class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
-if(watcher || thisClass)
-{
-if(_class)
-{
-struct Identifier * propID;
-
-stmt->type = 3;
-stmt->__anon1.expressions = MkList();
-if(!watches)
+else if(inCompiler && isLinkList && !isList)
 {
-struct __ecereNameSpace__ecere__sys__OldList * args;
+struct Declarator * decl;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
 
-args = MkList();
-ListAdd(args, CopyExpression(object));
-ListAdd(args, MkExpConstant("0"));
-ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
-ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
+decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
+stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
+ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
 }
+else if(inCompiler && _class->templateArgs)
+{
+if(isMap)
+sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
 else
+sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
+stmt->__anon1.compound.declarations = MkListOne(MkDeclarationInst(MkInstantiationNamed(MkListOne(MkSpecifierName(iteratorType)), MkExpIdentifier(id), MkListOne(MkMembersInitList(MkListOne(MkMemberInit(isMap ? MkListOne(MkIdentifier("map")) : (((void *)0)), MkInitializerAssignment(MkExpBrackets(exp)))))))));
+}
+if(inCompiler)
 {
-for(propID = (*watches).first; propID; propID = propID->next)
+symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
+if(block)
 {
-char propName[1024];
-struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
-
-if(prop)
+switch(block->type)
 {
-char getName[1024], setName[1024];
-struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
-
-DeclareProperty(curExternal, prop, setName, getName);
-strcpy(propName, "__ecereProp_");
-FullClassNameCat(propName, prop->_class->fullName, 0);
-strcat(propName, "_");
-FullClassNameCat(propName, prop->name, 1);
-ListAdd(args, CopyExpression(object));
-ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
-ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
-ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
-}
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
-}
-}
-if(object)
-FreeExpression(object);
-if(watcher)
-FreeExpression(watcher);
-FreeList(watches, (void *)(FreeIdentifier));
-}
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
-}
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
-}
+case 2:
+if(block->__anon1.compound.context)
+block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+break;
+case 4:
+if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
+block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
+block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+break;
+case 5:
+if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
+block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+break;
+case 6:
+if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
+block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+break;
+case 7:
+if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
+block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+break;
+case 8:
+if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
+block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
+break;
+case 18:
+if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
+block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
 break;
 }
 }
+if(filter)
+{
+block = MkIfStmt(filter, block, (((void *)0)));
 }
-
-void ProcessExpressionType(struct Expression * exp)
+if(isArray)
 {
-unsigned int unresolved = 0;
-struct Location oldyylloc = yylloc;
-unsigned int notByReference = 0;
-
-if(!exp || exp->expType)
-return ;
-yylloc = exp->loc;
-switch(exp->type)
+stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("array"))))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '<', MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("array")), '+', MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("count")))))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), INC_OP, (((void *)0)))), block));
+ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
+ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
+ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
+}
+else if(isBuiltin)
 {
-case 0:
+char count[128];
+
+sprintf(count, "%d", builtinCount);
+stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpIdentifier(MkIdentifier("__internalArray"))))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '<', MkExpOp(MkExpIdentifier(MkIdentifier("__internalArray")), '+', MkExpConstant(count))))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), INC_OP, (((void *)0)))), block));
+ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
+ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
+ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
+}
+else if(isLinkList && !isList)
 {
-struct Identifier * id = exp->__anon1.__anon1.identifier;
+struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
+struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
 
-if(!id || !topContext)
-return ;
-if(id->_class && id->_class->__anon1.__anon1.name)
+if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
 {
-id->classSym = id->_class->__anon1.__anon1.symbol;
+stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("next")))), block));
 }
-if(!strcmp(id->string, "__runtimePlatform"))
+else
 {
-exp->expType = ProcessTypeString("ecere::com::Platform", 1);
-break;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
+
+stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpCast(MkTypeName(specs, decl), MkExpCall(MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("GetNext")), MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("IteratorPointer")), (((void *)0))), MkExpIdentifier(CopyIdentifier(id)))))))), block));
 }
-else if(strstr(id->string, "__ecereClass") == id->string)
+ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
+ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
+ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
+}
+else
 {
-exp->expType = ProcessTypeString("ecere::com::Class", 1);
+stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
+}
+ProcessExpressionType(expIt);
+if((*stmt->__anon1.compound.declarations).first)
+ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
+if(symbol)
+symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
+ProcessStatement(stmt);
+}
+else
+ProcessStatement(stmt->__anon1.forEachStmt.stmt);
+if(inCompiler)
+curContext = stmt->__anon1.compound.context->parent;
 break;
 }
-else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
-{
-ReplaceClassMembers(exp, thisClass);
-if(exp->type != 0)
+else
 {
-ProcessExpressionType(exp);
-break;
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
 }
-if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
 break;
 }
-else
+case 9:
+break;
+case 10:
+break;
+case 11:
+break;
+case 12:
 {
-struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
+struct Expression * exp;
 
-if(!symbol)
-{
-if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
-break;
-else
+if(stmt->__anon1.expressions)
 {
-if(thisClass)
+for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
 {
-ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
-if(exp->type != 0)
+if(!exp->next)
 {
+if(curFunction && !curFunction->type)
+curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
+FreeType(exp->destType);
+exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
+if(exp->destType)
+exp->destType->refCount++;
+}
 ProcessExpressionType(exp);
-break;
 }
 }
-else if(currentClass && !id->_class)
-{
-if(ResolveIdWithClass(exp, currentClass, 1))
 break;
 }
-symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
-}
+case 14:
+{
+ProcessDeclaration(stmt->__anon1.decl, 1);
+break;
 }
-if(symbol)
+case 13:
 {
-struct Type * type = symbol->type;
-struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
+struct AsmField * field;
 
-if(_class && !strcmp(id->string, "this") && !type->classObjectType)
+if(stmt->__anon1.asmStmt.inputFields)
 {
-struct Context * context = SetupTemplatesContext(_class);
-
-type = ReplaceThisClassType(_class);
-FinishTemplatesContext(context);
-if(type)
-type->refCount = 0;
+for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
+if(field->expression)
+ProcessExpressionType(field->expression);
 }
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
-(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
-id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
-id->classSym = (((void *)0));
-exp->expType = type;
-if(type)
-type->refCount++;
-if(type && (type->kind == 15))
-exp->isConstant = 1;
-if(symbol->isParam || !strcmp(id->string, "this"))
+if(stmt->__anon1.asmStmt.outputFields)
 {
-if(_class && _class->type == 1 && !type->declaredWithStruct)
-exp->byReference = 1;
+for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
+if(field->expression)
+ProcessExpressionType(field->expression);
 }
-if(symbol->isIterator)
-{
-if(symbol->isIterator == 3)
+if(stmt->__anon1.asmStmt.clobberedFields)
 {
-exp->type = 5;
-exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
-((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
-exp->expType = (((void *)0));
-ProcessExpressionType(exp);
-}
-else if(symbol->isIterator != 4)
+for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
 {
-exp->type = 8;
-exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
-exp->__anon1.member.exp->expType = exp->expType;
-exp->__anon1.member.member = MkIdentifier("data");
-exp->expType = (((void *)0));
-ProcessExpressionType(exp);
+if(field->expression)
+ProcessExpressionType(field->expression);
 }
 }
 break;
 }
-else
+case 17:
 {
-struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
+struct PropertyWatch * propWatch;
+struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
+struct Expression * object = stmt->__anon1._watch.object;
+struct Expression * watcher = stmt->__anon1._watch.watcher;
 
-if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
+if(watcher)
+ProcessExpressionType(watcher);
+if(object)
+ProcessExpressionType(object);
+if(inCompiler)
 {
-char name[1024];
+if(watcher || thisClass)
+{
+struct External * external = curExternal;
+struct Context * context = curContext;
 
-strcpy(name, thisNameSpace);
-strcat(name, "::");
-strcat(name, id->string);
-definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
-}
-if(!definedExp)
-definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
-if(definedExp)
+stmt->type = 3;
+stmt->__anon1.expressions = MkList();
+for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
 {
-int c;
+struct ClassFunction * func;
+char watcherName[1024];
+struct __ecereNameSpace__ecere__com__Class * watcherClass = watcher ? ((watcher->expType && watcher->expType->kind == 8 && watcher->expType->__anon1._class) ? watcher->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
+struct External * createdExternal;
 
-for(c = 0; c < definedExpStackPos; c++)
-if(definedExpStack[c] == definedExp)
-break;
-if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
+sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
+if(propWatch->deleteWatch)
+strcat(watcherName, "_delete");
+else
 {
-struct Location backupYylloc = yylloc;
-struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
+struct Identifier * propID;
 
-definedExpStack[definedExpStackPos++] = definedExp;
-fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
-((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void *  buffer, unsigned int size, unsigned int count))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
-echoOn = 0;
-parsedExpression = (((void *)0));
-resetScanner();
-expression_yyparse();
-(__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
-if(backInput)
-fileInput = backInput;
-yylloc = backupYylloc;
-if(parsedExpression)
-{
-FreeIdentifier(id);
-exp->type = 5;
-exp->__anon1.list = MkListOne(parsedExpression);
-ApplyLocation(parsedExpression, &yylloc);
-ProcessExpressionType(exp);
-definedExpStackPos--;
-return ;
-}
-definedExpStackPos--;
-}
-else
-{
-if(inCompiler)
+for(propID = (*propWatch->properties).first; propID; propID = propID->next)
 {
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
-}
+strcat(watcherName, "_");
+strcat(watcherName, propID->string);
 }
 }
-else
+if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
 {
-struct GlobalData * data = (((void *)0));
-
-if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
+func = MkClassFunction(MkListOne(MkSpecifier(VOID)), (((void *)0)), MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifierName(object->expType->__anon1._class->string)), MkDeclaratorIdentifier(MkIdentifier("value"))))), (((void *)0)));
+ProcessClassFunctionBody(func, propWatch->compound);
+propWatch->compound = (((void *)0));
+createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
+curExternal = createdExternal;
+ProcessFunction(createdExternal->__anon1.function);
+if(propWatch->deleteWatch)
 {
-char name[1024];
+struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
 
-strcpy(name, thisNameSpace);
-strcat(name, "::");
-strcat(name, id->string);
-data = FindGlobalData(name);
-}
-if(!data)
-data = FindGlobalData(id->string);
-if(data)
-{
-DeclareGlobalData(curExternal, data);
-exp->expType = data->dataType;
-if(data->dataType)
-data->dataType->refCount++;
-(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
-id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
-break;
+ListAdd(args, CopyExpression(object));
+ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
+ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
+ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
 }
 else
 {
-struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
+struct Identifier * propID;
 
-if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
+for(propID = (*propWatch->properties).first; propID; propID = propID->next)
 {
-char name[1024];
+char propName[1024];
+struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
 
-strcpy(name, thisNameSpace);
-strcat(name, "::");
-strcat(name, id->string);
-function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
-}
-if(!function)
-function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
-if(function)
+if(prop)
 {
-char name[1024];
+char getName[1024], setName[1024];
+struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
 
-(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
-id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
-name[0] = (char)0;
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
-strcpy(name, "__ecereFunction_");
-FullClassNameCat(name, id->string, 0);
-if(DeclareFunction(curExternal, function, name))
-{
-(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
-id->string = __ecereNameSpace__ecere__sys__CopyString(name);
+DeclareProperty(createdExternal, prop, setName, getName);
+strcpy(propName, "__ecereProp_");
+FullClassNameCat(propName, prop->_class->fullName, 0);
+strcat(propName, "_");
+FullClassNameCat(propName, prop->name, 1);
+ListAdd(args, CopyExpression(object));
+ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
+ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
+ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
+ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
+__ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
 }
-exp->expType = function->dataType;
-if(function->dataType)
-function->dataType->refCount++;
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
-break;
+else
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
 }
 }
 }
+else
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
 }
+curExternal = external;
+curContext = context;
+if(watcher)
+FreeExpression(watcher);
+if(object)
+FreeExpression(object);
+FreeList(watches, (void *)(FreePropertyWatch));
 }
-unresolved = 1;
-break;
+else
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
 }
-case 1:
-{
-if(!exp->__anon1.instance->_class)
+else
 {
-if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
+for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
 {
-exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
-}
+ProcessStatement(propWatch->compound);
 }
-ProcessInstantiationType(exp->__anon1.instance);
-exp->isConstant = exp->__anon1.instance->isConstant;
-if(exp->__anon1.instance->_class)
-{
-exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
 }
 break;
 }
-case 2:
-{
-if(!exp->expType)
+case 15:
 {
-char * constant = exp->__anon1.__anon1.constant;
-struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
+struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
+struct Expression * object = stmt->__anon1._watch.object;
+struct __ecereNameSpace__ecere__com__Class * _class;
 
-exp->expType = type;
-if(constant[0] == '\'')
+if(object)
+ProcessExpressionType(object);
+if(inCompiler)
 {
-if((int)((unsigned char *)constant)[1] > 127)
+_class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
+if(_class)
 {
-int nb;
-unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
+struct Identifier * propID;
 
-if(nb < 2)
-ch = constant[1];
-(__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
-exp->__anon1.__anon1.constant = PrintUInt(ch);
-type->kind = 8;
-type->__anon1._class = FindClass("unichar");
-type->isSigned = 0;
-}
-else
+stmt->type = 3;
+stmt->__anon1.expressions = MkList();
+if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
 {
-type->kind = 1;
-type->isSigned = 1;
+watches = MkListOne(MkIdentifier(curFunction->propSet->string));
 }
+else if(!watches)
+{
 }
-else
+if(watches)
 {
-char * dot = strchr(constant, '.');
-unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
-char * exponent;
+for(propID = (*watches).first; propID; propID = propID->next)
+{
+struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
 
-if(isHex)
+if(prop)
 {
-exponent = strchr(constant, 'p');
-if(!exponent)
-exponent = strchr(constant, 'P');
+CreateFireWatcher(prop, object, stmt);
 }
 else
-{
-exponent = strchr(constant, 'e');
-if(!exponent)
-exponent = strchr(constant, 'E');
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
 }
-if(dot || exponent)
-{
-if(strchr(constant, 'f') || strchr(constant, 'F'))
-type->kind = 6;
-else
-type->kind = 7;
-type->isSigned = 1;
 }
 else
 {
-unsigned int isSigned = constant[0] == '-';
-char * endP = (((void *)0));
-long long i64 = strtoll(constant, &endP, 0);
-uint64 ui64 = strtoull(constant, &endP, 0);
-unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
-unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
+struct __ecereNameSpace__ecere__com__Property * prop;
+struct __ecereNameSpace__ecere__com__Class * base;
 
-if(isSigned)
-{
-if(i64 < (((int)0x80000000)))
-is64Bit = 1;
-}
-else
+for(base = _class; base; base = base->base)
 {
-if(ui64 > (((int)0x7fffffff)))
+for(prop = base->membersAndProperties.first; prop; prop = prop->next)
 {
-if(ui64 > (0xffffffff))
+if(prop->isProperty && prop->isWatchable)
 {
-is64Bit = 1;
-if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
-isSigned = 1;
+CreateFireWatcher(prop, object, stmt);
 }
 }
-else if(constant[0] != '0' || !constant[1])
-isSigned = 1;
 }
-if(forceUnsigned)
-isSigned = 0;
-type->kind = is64Bit ? 4 : 3;
-type->isSigned = isSigned;
 }
+if(object)
+FreeExpression(object);
+FreeList(watches, (void *)(FreeIdentifier));
 }
-exp->isConstant = 1;
-if(exp->destType && exp->destType->kind == 7)
-type->kind = 7;
-else if(exp->destType && exp->destType->kind == 6)
-type->kind = 6;
-else if(exp->destType && exp->destType->kind == 4)
-type->kind = 4;
+else
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
 }
 break;
 }
-case 3:
-{
-exp->isConstant = 1;
-exp->expType = __extension__ ({
-struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
-}), __ecereInstance2;
-});
-break;
-}
-case 13:
-case 26:
-ProcessExpressionType(exp->__anon1._new.size);
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
-});
-DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
-break;
-case 14:
-case 27:
-ProcessExpressionType(exp->__anon1._renew.size);
-ProcessExpressionType(exp->__anon1._renew.exp);
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
-});
-DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
-break;
-case 4:
+case 16:
 {
-unsigned int assign = 0, boolResult = 0, boolOps = 0;
-struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
-unsigned int useDestType = 0, useSideType = 0;
-struct Location oldyylloc = yylloc;
-unsigned int useSideUnit = 0;
-struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
-struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
+struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
+struct Expression * object = stmt->__anon1._watch.object;
+struct Expression * watcher = stmt->__anon1._watch.watcher;
+struct __ecereNameSpace__ecere__com__Class * _class;
 
-switch(exp->__anon1.op.op)
-{
-case '=':
-case MUL_ASSIGN:
-case DIV_ASSIGN:
-case MOD_ASSIGN:
-case ADD_ASSIGN:
-case SUB_ASSIGN:
-case LEFT_ASSIGN:
-case RIGHT_ASSIGN:
-case AND_ASSIGN:
-case XOR_ASSIGN:
-case OR_ASSIGN:
-assign = 1;
-break;
-case '!':
-break;
-case AND_OP:
-case OR_OP:
-boolOps = 1;
-boolResult = 1;
-break;
-case EQ_OP:
-case '<':
-case '>':
-case LE_OP:
-case GE_OP:
-case NE_OP:
-boolResult = 1;
-useSideType = 1;
-break;
-case '+':
-case '-':
-useSideUnit = 1;
-useSideType = 1;
-useDestType = 1;
-break;
-case LEFT_OP:
-case RIGHT_OP:
-useSideType = 1;
-useDestType = 1;
-break;
-case '|':
-case '^':
-useSideType = 1;
-useDestType = 1;
-break;
-case '/':
-case '%':
-useSideType = 1;
-useDestType = 1;
-break;
-case '&':
-case '*':
-if(exp->__anon1.op.exp1)
+if(object)
+ProcessExpressionType(object);
+if(watcher)
+ProcessExpressionType(watcher);
+if(inCompiler)
 {
-useSideType = 1;
-useDestType = 1;
-}
-break;
-}
-if(exp->__anon1.op.op == '&')
+_class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
+if(watcher || thisClass)
 {
-if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
+if(_class)
 {
-struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
-struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
+struct Identifier * propID;
 
-if(symbol && symbol->isIterator == 2)
-{
-exp->type = 8;
-exp->__anon1.member.exp = exp->__anon1.op.exp2;
-exp->__anon1.member.member = MkIdentifier("key");
-exp->expType = (((void *)0));
-exp->__anon1.op.exp2->expType = symbol->type;
-symbol->type->refCount++;
-ProcessExpressionType(exp);
-FreeType(dummy);
-break;
-}
-}
-}
-if(exp->__anon1.op.exp1)
-{
-if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
-useDestType = 0;
-if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
-{
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = exp->destType;
-exp->__anon1.op.exp1->opDestType = 1;
-if(exp->destType)
-exp->destType->refCount++;
-}
-else if(!assign)
-{
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = dummy;
-dummy->refCount++;
-}
-if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
-exp->__anon1.op.exp1->destType->count++;
-ProcessExpressionType(exp->__anon1.op.exp1);
-if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
-exp->__anon1.op.exp1->destType->count--;
-exp->__anon1.op.exp1->opDestType = 0;
-if(!exp->__anon1.op.exp2 && (exp->__anon1.op.op == INC_OP || exp->__anon1.op.op == DEC_OP) && exp->__anon1.op.exp1->expType && exp->__anon1.op.exp1->expType->kind == 8 && exp->__anon1.op.exp1->expType->__anon1._class && exp->__anon1.op.exp1->expType->__anon1._class->__anon1.registered && exp->__anon1.op.exp1->expType->__anon1._class->__anon1.registered->type == 3)
-{
-exp->__anon1.op.exp2 = MkExpConstant("1");
-exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
-assign = 1;
-}
-if(exp->__anon1.op.exp1->destType == dummy)
-{
-FreeType(dummy);
-exp->__anon1.op.exp1->destType = (((void *)0));
-}
-type1 = exp->__anon1.op.exp1->expType;
-}
-if(exp->__anon1.op.exp2)
+stmt->type = 3;
+stmt->__anon1.expressions = MkList();
+if(!watches)
 {
-char expString[10240];
+struct __ecereNameSpace__ecere__sys__OldList * args;
 
-expString[0] = '\0';
-if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
-{
-if(exp->__anon1.op.exp1)
-{
-exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
-if(exp->__anon1.op.exp1->expType)
-exp->__anon1.op.exp1->expType->refCount++;
-}
-else
-{
-exp->__anon1.op.exp2->destType = exp->destType;
-if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
-exp->__anon1.op.exp2->opDestType = 1;
-if(exp->destType)
-exp->destType->refCount++;
-}
-if(type1)
-type1->refCount++;
-exp->expType = type1;
-}
-else if(assign)
-{
-if(inCompiler)
-PrintExpression(exp->__anon1.op.exp2, expString);
-if(type1 && type1->kind == 13)
-{
-if(exp->__anon1.op.op == MUL_ASSIGN || exp->__anon1.op.op == DIV_ASSIGN || exp->__anon1.op.op == MOD_ASSIGN || exp->__anon1.op.op == LEFT_ASSIGN || exp->__anon1.op.op == RIGHT_ASSIGN || exp->__anon1.op.op == AND_ASSIGN || exp->__anon1.op.op == OR_ASSIGN)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
-else if(exp->__anon1.op.op == '=')
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-if(type1)
-type1->refCount++;
-}
-}
-else
-{
-if(exp->__anon1.op.op == MUL_ASSIGN || exp->__anon1.op.op == DIV_ASSIGN || exp->__anon1.op.op == MOD_ASSIGN || exp->__anon1.op.op == LEFT_ASSIGN || exp->__anon1.op.op == RIGHT_ASSIGN)
-;
-else
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-if(type1)
-type1->refCount++;
-}
-}
-if(type1)
-type1->refCount++;
-exp->expType = type1;
-}
-else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = exp->destType;
-if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
-exp->__anon1.op.exp2->opDestType = 1;
-if(exp->destType)
-exp->destType->refCount++;
-}
-else
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = dummy;
-dummy->refCount++;
-}
-if(type1 && boolResult && useSideType && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && (type1->__anon1._class->__anon1.registered->type == 2 || type1->__anon1._class->__anon1.registered->type == 4))
-{
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-type1->refCount++;
+args = MkList();
+ListAdd(args, CopyExpression(object));
+ListAdd(args, MkExpConstant("0"));
+ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
+ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
 }
-if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
-exp->__anon1.op.exp2->destType->count++;
-if(exp->__anon1.op.op == SIZEOF)
-{
-struct Expression * e = exp->__anon1.op.exp2;
-
-while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
-{
-if(e->type == 5 || e->type == 32 || e->type == 23)
-{
-if(e->type == 23)
-e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
 else
-e = (*e->__anon1.list).last;
-}
-}
-if(e->type == 11 && e->__anon1.cast.exp)
-e->__anon1.cast.exp->needCast = 1;
-}
-ProcessExpressionType(exp->__anon1.op.exp2);
-exp->__anon1.op.exp2->opDestType = 0;
-if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
-exp->__anon1.op.exp2->destType->count--;
-if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
 {
-if(exp->__anon1.op.exp2->expType->kind == 23 || exp->__anon1.op.exp2->expType->kind == 22 || exp->__anon1.op.exp2->expType->kind == 4 || exp->__anon1.op.exp2->expType->kind == 3 || exp->__anon1.op.exp2->expType->kind == 2 || exp->__anon1.op.exp2->expType->kind == 1)
-{
-if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
-}
-else if(exp->__anon1.op.exp2->expType->kind == 13 || exp->__anon1.op.exp2->expType->kind == 12 || exp->__anon1.op.exp2->expType->kind == 11 || exp->__anon1.op.exp2->expType->kind == 16 || (type1->__anon1.type->kind == 0 && exp->__anon1.op.exp2->expType->kind == 8 && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered && (exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 0 || exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 1 || exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 5)))
-{
-if(exp->__anon1.op.op == ADD_ASSIGN)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
-}
-else if((exp->__anon1.op.exp2->expType->kind == 8 && type1->kind == 13 && type1->__anon1.type->kind == 8 && type1->__anon1.type->__anon1._class == exp->__anon1.op.exp2->expType->__anon1._class && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 1))
-{
-if(exp->__anon1.op.op == ADD_ASSIGN)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
-}
-else if(inCompiler)
+for(propID = (*watches).first; propID; propID = propID->next)
 {
-char type1String[1024];
-char type2String[1024];
+char propName[1024];
+struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
 
-type1String[0] = '\0';
-type2String[0] = '\0';
-PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
-PrintType(type1, type2String, 0, 1);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
-}
-}
-if(exp->__anon1.op.exp2->destType == dummy)
-{
-FreeType(dummy);
-exp->__anon1.op.exp2->destType = (((void *)0));
-}
-if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
-{
-type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-type2->refCount = 1;
-CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
-type2->isSigned = 1;
-}
-else if(exp->__anon1.op.op == '~' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && (!exp->__anon1.op.exp2->expType->isSigned || exp->__anon1.op.exp2->expType->kind != 3))
+if(prop)
 {
-type2 = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+char getName[1024], setName[1024];
+struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
 
-__ecereInstance1->kind = 3, __ecereInstance1;
-});
-type2->refCount = 1;
-type2->isSigned = 1;
+DeclareProperty(curExternal, prop, setName, getName);
+strcpy(propName, "__ecereProp_");
+FullClassNameCat(propName, prop->_class->fullName, 0);
+strcat(propName, "_");
+FullClassNameCat(propName, prop->name, 1);
+ListAdd(args, CopyExpression(object));
+ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
+ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
+ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
 }
 else
-{
-type2 = exp->__anon1.op.exp2->expType;
-if(type2)
-type2->refCount++;
-}
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
 }
-dummy->kind = 0;
-if(exp->__anon1.op.op == SIZEOF)
-{
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
-});
-exp->isConstant = 1;
 }
-else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
-{
-exp->expType = Dereference(type2);
-if(type2 && type2->kind == 8)
-notByReference = 1;
+if(object)
+FreeExpression(object);
+if(watcher)
+FreeExpression(watcher);
+FreeList(watches, (void *)(FreeIdentifier));
 }
-else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
-exp->expType = Reference(type2);
-else if(!assign)
-{
-if(boolOps)
-{
-if(exp->__anon1.op.exp1)
-{
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = MkClassType("bool");
-exp->__anon1.op.exp1->destType->truth = 1;
-if(!exp->__anon1.op.exp1->expType)
-ProcessExpressionType(exp->__anon1.op.exp1);
 else
-CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
-FreeType(exp->__anon1.op.exp1->expType);
-exp->__anon1.op.exp1->expType = MkClassType("bool");
-exp->__anon1.op.exp1->expType->truth = 1;
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
 }
-if(exp->__anon1.op.exp2)
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = MkClassType("bool");
-exp->__anon1.op.exp2->destType->truth = 1;
-if(!exp->__anon1.op.exp2->expType)
-ProcessExpressionType(exp->__anon1.op.exp2);
 else
-CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
-FreeType(exp->__anon1.op.exp2->expType);
-exp->__anon1.op.exp2->expType = MkClassType("bool");
-exp->__anon1.op.exp2->expType->truth = 1;
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
 }
+break;
 }
-else if(exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && ((useSideType) || ((!type1 || type1->kind != 8 || !strcmp(type1->__anon1._class->string, "String")) && (!type2 || type2->kind != 8 || !strcmp(type2->__anon1._class->string, "String")))))
-{
-if(type1 && type2 && ((type1->kind == 8 && type1->__anon1._class && strcmp(type1->__anon1._class->string, "String")) == (type2->kind == 8 && type2->__anon1._class && strcmp(type2->__anon1._class->string, "String"))))
-{
-if(exp->__anon1.op.op == '-' && ((type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4) || (type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)))
-{
-struct Type * intType;
-
-if(!type1->__anon1._class->__anon1.registered->dataType)
-type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
-if(!type2->__anon1._class->__anon1.registered->dataType)
-type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
-intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp1->destType = intType;
-exp->__anon1.op.exp2->destType = intType;
-intType->refCount++;
 }
-else
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-type1->refCount++;
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = type2;
-type2->refCount++;
 }
-if(!boolResult && type1->kind == 8 && (!exp->destType || exp->destType->kind != 8) && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1->__anon1._class->__anon1.registered != type2->__anon1._class->__anon1.registered)
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "operating on %s and %s with an untyped result, assuming %s\n", (((void *)0))), type1->__anon1._class->string, type2->__anon1._class->string, type1->__anon1._class->string);
-if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
-{
-struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
 
-if(argExp)
+void ComputeDataTypes()
 {
-struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
+struct External * external;
 
-exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
-ProcessExpressionType(exp->__anon1.op.exp1);
-if(type2->kind != 13)
+currentClass = (((void *)0));
+containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
+DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
+DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
+DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
+DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
+DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
+DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
+DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
+DeclareFunctionUtil((((void *)0)), "eSystem_New");
+DeclareFunctionUtil((((void *)0)), "eSystem_New0");
+DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
+DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
+DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
+DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
+DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
+DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
+DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
+DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
+DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
+DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
+DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
+for(external = (*ast).first; external; external = external->next)
 {
-ProcessExpressionType(classExp);
-exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
-if(!exp->__anon1.op.exp2->expType)
+afterExternal = curExternal = external;
+if(external->type == 0)
 {
-if(type2)
-FreeType(type2);
-type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
-type2->refCount++;
+if(memoryGuard)
+{
+DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
+DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
 }
-ProcessExpressionType(exp->__anon1.op.exp2);
+currentClass = external->__anon1.function->_class;
+ProcessFunction(external->__anon1.function);
 }
+else if(external->type == 1)
+{
+if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
+{
+DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
+DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
 }
+currentClass = (((void *)0));
+if(external->__anon1.declaration)
+ProcessDeclaration(external->__anon1.declaration, 1);
 }
-if(!boolResult && ((type1->kind == 13 || type1->kind == 12 || (type1->kind == 8 && !strcmp(type1->__anon1._class->string, "String"))) && (type2->kind == 23 || type2->kind == 22 || type2->kind == 4 || type2->kind == 3 || type2->kind == 2 || type2->kind == 1)))
+else if(external->type == 2)
 {
-if(type1->kind != 8 && type1->__anon1.type->kind == 0)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
-exp->expType = type1;
-if(type1)
-type1->refCount++;
+struct ClassDefinition * _class = external->__anon1._class;
+
+currentClass = external->symbol->__anon1.registered;
+if(memoryGuard)
+{
+DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
+DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
 }
-else if(!boolResult && ((type2->kind == 13 || type2->kind == 12 || (type2->kind == 8 && !strcmp(type2->__anon1._class->string, "String"))) && (type1->kind == 23 || type1->kind == 22 || type1->kind == 4 || type1->kind == 3 || type1->kind == 2 || type1->kind == 1)))
+if(_class->definitions)
 {
-if(type2->kind != 8 && type2->__anon1.type->kind == 0)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
-exp->expType = type2;
-if(type2)
-type2->refCount++;
+ProcessClass(_class->definitions, _class->symbol);
 }
-else if((type1->kind == 13 && type2->kind != 13 && type2->kind != 12 && type2->kind != 11 && type2->kind != 16 && type2->kind != 8 && type2->kind != 19) || (type2->kind == 13 && type1->kind != 13 && type1->kind != 12 && type1->kind != 11 && type1->kind != 16 && type1->kind != 8 && type1->kind != 19))
+if(inCompiler)
 {
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
+((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
 }
-else
+}
+else if(external->type == 4)
 {
-unsigned int success = 0;
+thisNameSpace = external->__anon1.id->string;
+}
+}
+currentClass = (((void *)0));
+thisNameSpace = (((void *)0));
+curExternal = (((void *)0));
+}
 
-if(type1->kind == 13 && type2->kind == 13)
-{
-if(exp->__anon1.op.op == '+')
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
-else if(exp->__anon1.op.op == '-')
-{
-if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
+void ProcessExpressionType(struct Expression * exp)
 {
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+unsigned int unresolved = 0;
+struct Location oldyylloc = yylloc;
+unsigned int notByReference = 0;
 
-__ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
-});
-success = 1;
-if(type1->__anon1.type->kind == 20)
+if(!exp || exp->expType)
+return ;
+yylloc = exp->loc;
+switch(exp->type)
 {
-struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
-
-if(argExp)
+case 0:
 {
-struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
+struct Identifier * id = exp->__anon1.__anon1.identifier;
 
-ProcessExpressionType(classExp);
-exp->type = 5;
-exp->__anon1.list = MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp1))), exp->__anon1.op.op, MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp2)))))), '/', MkExpMember(classExp, MkIdentifier("typeSize"))));
-ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
-FreeType(dummy);
+if(!id || !topContext)
 return ;
-}
-}
-}
-}
-}
-if(!success && exp->__anon1.op.exp1->type == 2)
-{
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
+if(id->_class && id->_class->__anon1.__anon1.name)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->destType;
-if(exp->__anon1.op.exp1->destType)
-exp->__anon1.op.exp1->destType->refCount++;
-success = 1;
+id->classSym = id->_class->__anon1.__anon1.symbol;
 }
-else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
+if(!strcmp(id->string, "__runtimePlatform"))
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp2->destType;
-if(exp->__anon1.op.exp2->destType)
-exp->__anon1.op.exp2->destType->refCount++;
-success = 1;
-}
+exp->expType = ProcessTypeString("ecere::com::Platform", 1);
+break;
 }
-else if(!success)
-{
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
+else if(strstr(id->string, "__ecereClass") == id->string)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp2->destType;
-if(exp->__anon1.op.exp2->destType)
-exp->__anon1.op.exp2->destType->refCount++;
-success = 1;
+exp->expType = ProcessTypeString("ecere::com::Class", 1);
+break;
 }
-else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
+else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->destType;
-if(exp->__anon1.op.exp1->destType)
-exp->__anon1.op.exp1->destType->refCount++;
-success = 1;
+ReplaceClassMembers(exp, thisClass);
+if(exp->type != 0)
+{
+ProcessExpressionType(exp);
+break;
 }
+if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
+break;
 }
-if(!success)
+else
 {
-char expString1[10240];
-char expString2[10240];
-char type1[1024];
-char type2[1024];
+struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
 
-expString1[0] = '\0';
-expString2[0] = '\0';
-type1[0] = '\0';
-type2[0] = '\0';
-if(inCompiler)
+if(!symbol)
 {
-PrintExpression(exp->__anon1.op.exp1, expString1);
-__ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
-PrintExpression(exp->__anon1.op.exp2, expString2);
-__ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
-PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
-PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
-}
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
-}
+if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
+break;
+else
+{
+if(thisClass)
+{
+ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
+if(exp->type != 0)
+{
+ProcessExpressionType(exp);
+break;
 }
 }
-else if(!boolResult && (!useSideUnit) && type2 && type1 && type2->kind == 8 && type1->kind != 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
+else if(currentClass && !id->_class)
 {
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
-if(type2->__anon1._class->__anon1.registered->dataType)
-type2->__anon1._class->__anon1.registered->dataType->refCount++;
-CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
-exp->expType = type2;
-if(type2)
-type2->refCount++;
+if(ResolveIdWithClass(exp, currentClass, 1))
+break;
 }
-else if(!boolResult && (!useSideUnit) && type1 && type2 && type1->kind == 8 && type2->kind != 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
-{
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
-if(type1->__anon1._class->__anon1.registered->dataType)
-type1->__anon1._class->__anon1.registered->dataType->refCount++;
-CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
-exp->expType = type1;
-if(type1)
-type1->refCount++;
+symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
 }
-else if(type1)
+}
+if(symbol)
 {
-unsigned int valid = 0;
+struct Type * type = symbol->type;
+struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
 
-if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
+if(_class && !strcmp(id->string, "this") && !type->classObjectType)
 {
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-if(!type1->__anon1._class->__anon1.registered->dataType)
-type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
-exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
-exp->__anon1.op.exp2->destType->refCount++;
-CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
-if(type2)
-FreeType(type2);
-type2 = exp->__anon1.op.exp2->destType;
-if(type2)
-type2->refCount++;
-exp->expType = type2;
-type2->refCount++;
+struct Context * context = SetupTemplatesContext(_class);
+
+type = ReplaceThisClassType(_class);
+FinishTemplatesContext(context);
+if(type)
+type->refCount = 0;
 }
-if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
+FreeSpecifier(id->_class);
+id->_class = (((void *)0));
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
+id->classSym = (((void *)0));
+exp->expType = type;
+if(type)
+type->refCount++;
+if(type && (type->kind == 15))
+exp->isConstant = 1;
+if(symbol->isParam || !strcmp(id->string, "this"))
 {
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-if(!type2->__anon1._class->__anon1.registered->dataType)
-type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
-exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
-exp->__anon1.op.exp1->destType->refCount++;
-CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
-type1 = exp->__anon1.op.exp1->destType;
-exp->expType = type1;
-type1->refCount++;
+if(_class && _class->type == 1 && !type->declaredWithStruct)
+exp->byReference = 1;
 }
-if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
-{
-unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
-unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
-
-if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
-{
-if(op1IsEnum && exp->__anon1.op.exp2->expType)
+if(symbol->isIterator)
 {
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
+if(symbol->isIterator == 3)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp2->expType;
-if(exp->__anon1.op.exp2->expType)
-exp->__anon1.op.exp2->expType->refCount++;
-valid = 1;
-}
+exp->type = 5;
+exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
+((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
+exp->expType = (((void *)0));
+ProcessExpressionType(exp);
 }
-else if(op2IsEnum && exp->__anon1.op.exp1->expType)
-{
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
+else if(symbol->isIterator != 4)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->expType;
-if(exp->__anon1.op.exp1->expType)
-exp->__anon1.op.exp1->expType->refCount++;
-valid = 1;
+exp->type = 8;
+exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
+exp->__anon1.member.exp->expType = exp->expType;
+exp->__anon1.member.member = MkIdentifier("data");
+exp->expType = (((void *)0));
+ProcessExpressionType(exp);
 }
 }
+break;
 }
 else
 {
-if(op1IsEnum && exp->__anon1.op.exp2->expType)
+struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
+
+if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
 {
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
+char name[1024];
+
+strcpy(name, thisNameSpace);
+strcat(name, "::");
+strcat(name, id->string);
+definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
+}
+if(!definedExp)
+definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
+if(definedExp)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->expType;
-if(exp->__anon1.op.exp1->expType)
-exp->__anon1.op.exp1->expType->refCount++;
-valid = 1;
+int c;
+
+for(c = 0; c < definedExpStackPos; c++)
+if(definedExpStack[c] == definedExp)
+break;
+if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
+{
+struct Location backupYylloc = yylloc;
+struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
+
+definedExpStack[definedExpStackPos++] = definedExp;
+fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
+((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void *  buffer, unsigned int size, unsigned int count))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
+
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
+
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
+echoOn = 0;
+parsedExpression = (((void *)0));
+resetScanner();
+expression_yyparse();
+(__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
+if(backInput)
+fileInput = backInput;
+yylloc = backupYylloc;
+if(parsedExpression)
+{
+FreeIdentifier(id);
+exp->type = 5;
+exp->__anon1.list = MkListOne(parsedExpression);
+ApplyLocation(parsedExpression, &yylloc);
+ProcessExpressionType(exp);
+definedExpStackPos--;
+return ;
 }
+definedExpStackPos--;
 }
-else if(op2IsEnum && exp->__anon1.op.exp1->expType)
+else
 {
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
+if(inCompiler)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp2->expType;
-if(exp->__anon1.op.exp2->expType)
-exp->__anon1.op.exp2->expType->refCount++;
-valid = 1;
-}
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
 }
 }
 }
-if(!valid)
-{
-if(type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && (type1->kind != 8 || !type1->__anon1._class || !type1->__anon1._class->__anon1.registered || type1->__anon1._class->__anon1.registered->type != 3))
+else
 {
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = type2;
-type2->refCount++;
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
+struct GlobalData * data = (((void *)0));
+
+if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->destType;
-if(exp->__anon1.op.exp1->destType)
-exp->__anon1.op.exp1->destType->refCount++;
+char name[1024];
+
+strcpy(name, thisNameSpace);
+strcat(name, "::");
+strcat(name, id->string);
+data = FindGlobalData(name);
 }
+if(!data)
+data = FindGlobalData(id->string);
+if(data)
+{
+DeclareGlobalData(curExternal, data);
+exp->expType = data->dataType;
+if(data->dataType)
+data->dataType->refCount++;
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
+FreeSpecifier(id->_class);
+id->_class = (((void *)0));
+break;
 }
 else
 {
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-type1->refCount++;
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
+struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
+
+if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp2->destType;
-if(exp->__anon1.op.exp2->destType)
-exp->__anon1.op.exp2->destType->refCount++;
+char name[1024];
+
+strcpy(name, thisNameSpace);
+strcat(name, "::");
+strcat(name, id->string);
+function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
 }
-else if(type1 && type2)
+if(!function)
+function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
+if(function)
 {
-char expString1[10240];
-char expString2[10240];
-char type1String[1024];
-char type2String[1024];
+char name[1024];
 
-expString1[0] = '\0';
-expString2[0] = '\0';
-type1String[0] = '\0';
-type2String[0] = '\0';
-if(inCompiler)
-{
-PrintExpression(exp->__anon1.op.exp1, expString1);
-__ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
-PrintExpression(exp->__anon1.op.exp2, expString2);
-__ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
-PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
-PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
-}
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
-if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
+name[0] = (char)0;
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
+strcpy(name, "__ecereFunction_");
+FullClassNameCat(name, id->string, 0);
+if(DeclareFunction(curExternal, function, name))
 {
-exp->expType = exp->__anon1.op.exp1->expType;
-if(exp->__anon1.op.exp1->expType)
-exp->__anon1.op.exp1->expType->refCount++;
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(name);
 }
-else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
-{
-exp->expType = exp->__anon1.op.exp2->expType;
-if(exp->__anon1.op.exp2->expType)
-exp->__anon1.op.exp2->expType->refCount++;
+exp->expType = function->dataType;
+if(function->dataType)
+function->dataType->refCount++;
+FreeSpecifier(id->_class);
+id->_class = (((void *)0));
+break;
 }
 }
 }
 }
 }
-else if(type2)
-{
-if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
-{
-struct Type * oldType = exp->__anon1.op.exp1->expType;
-
-exp->__anon1.op.exp1->expType = (((void *)0));
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
-FreeType(oldType);
-else
-exp->__anon1.op.exp1->expType = oldType;
+unresolved = 1;
+break;
 }
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = type2;
-type2->refCount++;
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
+case 1:
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->destType;
-if(exp->__anon1.op.exp1->destType)
-exp->__anon1.op.exp1->destType->refCount++;
-}
-}
-}
-else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
+if(!exp->__anon1.instance->_class)
 {
-if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
+if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
 {
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
-if(type2->__anon1._class->__anon1.registered->dataType)
-type2->__anon1._class->__anon1.registered->dataType->refCount++;
-CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
+exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
 }
-if(exp->__anon1.op.op == '!')
-{
-exp->expType = MkClassType("bool");
-exp->expType->truth = 1;
 }
-else
+ProcessInstantiationType(exp->__anon1.instance);
+exp->isConstant = exp->__anon1.instance->isConstant;
+if(exp->__anon1.instance->_class)
 {
-exp->expType = type2;
-if(type2)
-type2->refCount++;
+exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
 }
+break;
 }
-else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
+case 2:
 {
-if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
+if(!exp->expType)
 {
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
-if(type1->__anon1._class->__anon1.registered->dataType)
-type1->__anon1._class->__anon1.registered->dataType->refCount++;
-CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
-}
-exp->expType = type1;
-if(type1)
-type1->refCount++;
-}
-}
-yylloc = exp->loc;
-if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
+char * constant = exp->__anon1.__anon1.constant;
+struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
+
+exp->expType = type;
+if(constant[0] == '\'')
 {
-char expString[10000];
+if((int)((unsigned char *)constant)[1] > 127)
+{
+int nb;
+unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
 
-expString[0] = '\0';
-if(inCompiler)
+if(nb < 2)
+ch = constant[1];
+(__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
+exp->__anon1.__anon1.constant = PrintUInt(ch);
+type->kind = 8;
+type->__anon1._class = FindClass("unichar");
+type->isSigned = 0;
+}
+else
 {
-PrintExpression(exp->__anon1.op.exp1, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+type->kind = 1;
+type->isSigned = 1;
 }
-if(expString[0])
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
 }
-if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
+else
 {
-char expString[10240];
+char * dot = strchr(constant, '.');
+unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
+char * exponent;
 
-expString[0] = '\0';
-if(inCompiler)
+if(isHex)
 {
-PrintExpression(exp->__anon1.op.exp2, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
-}
-if(expString[0])
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
+exponent = strchr(constant, 'p');
+if(!exponent)
+exponent = strchr(constant, 'P');
 }
-if(boolResult)
+else
 {
-FreeType(exp->expType);
-exp->expType = MkClassType("bool");
-exp->expType->truth = 1;
+exponent = strchr(constant, 'e');
+if(!exponent)
+exponent = strchr(constant, 'E');
 }
-if(exp->__anon1.op.op != SIZEOF)
-exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
-if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
+if(dot || exponent)
 {
-DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
-}
-if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
-yylloc = oldyylloc;
-FreeType(dummy);
-if(type2)
-FreeType(type2);
-break;
+if(strchr(constant, 'f') || strchr(constant, 'F'))
+type->kind = 6;
+else
+type->kind = 7;
+type->isSigned = 1;
 }
-case 5:
-case 32:
+else
 {
-struct Expression * e;
+unsigned int isSigned = constant[0] == '-';
+char * endP = (((void *)0));
+long long i64 = strtoll(constant, &endP, 0);
+uint64 ui64 = strtoull(constant, &endP, 0);
+unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
+unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
 
-exp->isConstant = 1;
-for(e = (*exp->__anon1.list).first; e; e = e->next)
+if(isSigned)
 {
-if(!e->next)
+if(i64 < (((int)0x80000000)))
+is64Bit = 1;
+}
+else
 {
-FreeType(e->destType);
-e->opDestType = exp->opDestType;
-e->destType = exp->destType;
-if(e->destType)
+if(ui64 > (((int)0x7fffffff)))
 {
-exp->destType->refCount++;
+if(ui64 > (0xffffffff))
+{
+is64Bit = 1;
+if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
+isSigned = 1;
 }
 }
-ProcessExpressionType(e);
-if(!exp->expType && !e->next)
-{
-exp->expType = e->expType;
-if(e->expType)
-e->expType->refCount++;
+else if(constant[0] != '0' || !constant[1])
+isSigned = 1;
 }
-if(!e->isConstant)
-exp->isConstant = 0;
+if(forceUnsigned)
+isSigned = 0;
+type->kind = is64Bit ? 4 : 3;
+type->isSigned = isSigned;
 }
-e = (*exp->__anon1.list).first;
-if(!e->next && e->type == 8)
-{
-struct Expression * next = exp->next, * prev = exp->prev;
-
-FreeType(exp->expType);
-FreeType(exp->destType);
-(__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
-*exp = *e;
-exp->prev = prev;
-exp->next = next;
-((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
-ProcessExpressionType(exp);
+}
+exp->isConstant = 1;
+if(exp->destType && exp->destType->kind == 7)
+type->kind = 7;
+else if(exp->destType && exp->destType->kind == 6)
+type->kind = 6;
+else if(exp->destType && exp->destType->kind == 4)
+type->kind = 4;
 }
 break;
 }
-case 6:
+case 3:
 {
-struct Expression * e;
-
 exp->isConstant = 1;
-ProcessExpressionType(exp->__anon1.index.exp);
-if(!exp->__anon1.index.exp->isConstant)
-exp->isConstant = 0;
-if(exp->__anon1.index.exp->expType)
+exp->expType = __extension__ ({
+struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
+}), __ecereInstance2;
+});
+break;
+}
+case 13:
+case 26:
+ProcessExpressionType(exp->__anon1._new.size);
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
+});
+DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
+break;
+case 14:
+case 27:
+ProcessExpressionType(exp->__anon1._renew.size);
+ProcessExpressionType(exp->__anon1._renew.exp);
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
+});
+DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
+break;
+case 4:
 {
-struct Type * source = exp->__anon1.index.exp->expType;
+unsigned int assign = 0, boolResult = 0, boolOps = 0;
+struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
+unsigned int useDestType = 0, useSideType = 0;
+struct Location oldyylloc = yylloc;
+unsigned int useSideUnit = 0;
+struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
+struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
 
-if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
+switch(exp->__anon1.op.op)
+{
+case '=':
+case MUL_ASSIGN:
+case DIV_ASSIGN:
+case MOD_ASSIGN:
+case ADD_ASSIGN:
+case SUB_ASSIGN:
+case LEFT_ASSIGN:
+case RIGHT_ASSIGN:
+case AND_ASSIGN:
+case XOR_ASSIGN:
+case OR_ASSIGN:
+assign = 1;
+break;
+case '!':
+break;
+case AND_OP:
+case OR_OP:
+boolOps = 1;
+boolResult = 1;
+break;
+case EQ_OP:
+case '<':
+case '>':
+case LE_OP:
+case GE_OP:
+case NE_OP:
+boolResult = 1;
+useSideType = 1;
+break;
+case '+':
+case '-':
+useSideUnit = 1;
+useSideType = 1;
+useDestType = 1;
+break;
+case LEFT_OP:
+case RIGHT_OP:
+useSideType = 1;
+useDestType = 1;
+break;
+case '|':
+case '^':
+useSideType = 1;
+useDestType = 1;
+break;
+case '/':
+case '%':
+useSideType = 1;
+useDestType = 1;
+break;
+case '&':
+case '*':
+if(exp->__anon1.op.exp1)
 {
-struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
-struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
-
-if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
+useSideType = 1;
+useDestType = 1;
+}
+break;
+}
+if(exp->__anon1.op.op == '&')
 {
-exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
-if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
+if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
 {
-struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
+struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
+struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
 
-if(type->kind == 8)
-type->constant = 1;
-else if(type->kind == 13)
+if(symbol && symbol->isIterator == 2)
 {
-struct Type * t = type;
-
-while(t->kind == 13)
-t = t->__anon1.type;
-t->constant = 1;
+exp->type = 8;
+exp->__anon1.member.exp = exp->__anon1.op.exp2;
+exp->__anon1.member.member = MkIdentifier("key");
+exp->expType = (((void *)0));
+exp->__anon1.op.exp2->expType = symbol->type;
+symbol->type->refCount++;
+ProcessExpressionType(exp);
+FreeType(dummy);
+break;
 }
-((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
 }
 }
+if(exp->__anon1.op.exp1)
+{
+if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
+useDestType = 0;
+if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
+{
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = exp->destType;
+exp->__anon1.op.exp1->opDestType = 1;
+if(exp->destType)
+exp->destType->refCount++;
 }
+else if(!assign)
+{
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = dummy;
+dummy->refCount++;
 }
-for(e = (*exp->__anon1.index.index).first; e; e = e->next)
+if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
+exp->__anon1.op.exp1->destType->count++;
+ProcessExpressionType(exp->__anon1.op.exp1);
+if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
+exp->__anon1.op.exp1->destType->count--;
+exp->__anon1.op.exp1->opDestType = 0;
+if(!exp->__anon1.op.exp2 && (exp->__anon1.op.op == INC_OP || exp->__anon1.op.op == DEC_OP) && exp->__anon1.op.exp1->expType && exp->__anon1.op.exp1->expType->kind == 8 && exp->__anon1.op.exp1->expType->__anon1._class && exp->__anon1.op.exp1->expType->__anon1._class->__anon1.registered && exp->__anon1.op.exp1->expType->__anon1._class->__anon1.registered->type == 3)
 {
-if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
+exp->__anon1.op.exp2 = MkExpConstant("1");
+exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
+assign = 1;
+}
+if(exp->__anon1.op.exp1->destType == dummy)
 {
-if(e->destType)
-FreeType(e->destType);
-e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
+FreeType(dummy);
+exp->__anon1.op.exp1->destType = (((void *)0));
 }
-ProcessExpressionType(e);
-if(!e->next)
+type1 = exp->__anon1.op.exp1->expType;
+}
+if(exp->__anon1.op.exp2)
 {
+char expString[10240];
+
+expString[0] = '\0';
+if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
+{
+if(exp->__anon1.op.exp1)
+{
+exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
+if(exp->__anon1.op.exp1->expType)
+exp->__anon1.op.exp1->expType->refCount++;
 }
-if(!e->isConstant)
-exp->isConstant = 0;
+else
+{
+exp->__anon1.op.exp2->destType = exp->destType;
+if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
+exp->__anon1.op.exp2->opDestType = 1;
+if(exp->destType)
+exp->destType->refCount++;
 }
-if(!exp->expType)
-exp->expType = Dereference(exp->__anon1.index.exp->expType);
-if(exp->expType)
-DeclareType(curExternal, exp->expType, 1, 0);
-break;
+if(type1)
+type1->refCount++;
+exp->expType = type1;
 }
-case 7:
+else if(assign)
 {
-struct Expression * e;
-struct Type * functionType;
-struct Type * methodType = (((void *)0));
-char name[1024];
-
-name[0] = '\0';
 if(inCompiler)
+PrintExpression(exp->__anon1.op.exp2, expString);
+if(type1 && type1->kind == 13)
 {
-PrintExpression(exp->__anon1.call.exp, name);
-if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
+if(exp->__anon1.op.op == MUL_ASSIGN || exp->__anon1.op.op == DIV_ASSIGN || exp->__anon1.op.op == MOD_ASSIGN || exp->__anon1.op.op == LEFT_ASSIGN || exp->__anon1.op.op == RIGHT_ASSIGN || exp->__anon1.op.op == AND_ASSIGN || exp->__anon1.op.op == OR_ASSIGN)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
+else if(exp->__anon1.op.op == '=')
 {
-PrintExpression(exp->__anon1.call.exp, name);
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1;
+if(type1)
+type1->refCount++;
 }
 }
-if(exp->__anon1.call.exp->type == 0)
+else
 {
-struct Expression * idExp = exp->__anon1.call.exp;
-struct Identifier * id = idExp->__anon1.__anon1.identifier;
-
-if(!strcmp(id->string, "__builtin_frame_address"))
+if(exp->__anon1.op.op == MUL_ASSIGN || exp->__anon1.op.op == DIV_ASSIGN || exp->__anon1.op.op == MOD_ASSIGN || exp->__anon1.op.op == LEFT_ASSIGN || exp->__anon1.op.op == RIGHT_ASSIGN)
+;
+else
 {
-exp->expType = ProcessTypeString("void *", 1);
-if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
-ProcessExpressionType((*exp->__anon1.call.arguments).first);
-break;
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1;
+if(type1)
+type1->refCount++;
 }
-else if(!strcmp(id->string, "__ENDIAN_PAD"))
-{
-exp->expType = ProcessTypeString("int", 1);
-if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
-ProcessExpressionType((*exp->__anon1.call.arguments).first);
-break;
 }
-else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
+if(type1)
+type1->refCount++;
+exp->expType = type1;
+}
+else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
 {
-struct Expression * a = (((void *)0));
-struct Expression * b = (((void *)0));
-struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
-
-if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = exp->destType;
+if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
+exp->__anon1.op.exp2->opDestType = 1;
+if(exp->destType)
+exp->destType->refCount++;
+}
+else
 {
-a = (*exp->__anon1.call.arguments).first;
-b = (*exp->__anon1.call.arguments).last;
-tempExp1 = a;
-tempExp2 = b;
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = dummy;
+dummy->refCount++;
 }
-else if((*exp->__anon1.call.arguments).count == 1)
+if(type1 && boolResult && useSideType && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && (type1->__anon1._class->__anon1.registered->type == 2 || type1->__anon1._class->__anon1.registered->type == 4))
 {
-a = (*exp->__anon1.call.arguments).first;
-tempExp1 = a;
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1;
+type1->refCount++;
 }
-if(a)
+if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
+exp->__anon1.op.exp2->destType->count++;
+if(exp->__anon1.op.op == SIZEOF)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
-idExp->__anon1.__anon1.identifier = (((void *)0));
-FreeExpContents(exp);
-ProcessExpressionType(a);
-if(b)
-ProcessExpressionType(b);
-exp->type = 5;
-exp->__anon1.list = MkList();
-if(a->expType && (!b || b->expType))
+struct Expression * e = exp->__anon1.op.exp2;
+
+while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
 {
-if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
+if(e->type == 5 || e->type == 32 || e->type == 23)
 {
-if(inCompiler)
+if(e->type == 23)
+e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
+else
+e = (*e->__anon1.list).last;
+}
+}
+if(e->type == 11 && e->__anon1.cast.exp)
+e->__anon1.cast.exp->needCast = 1;
+}
+ProcessExpressionType(exp->__anon1.op.exp2);
+exp->__anon1.op.exp2->opDestType = 0;
+if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
+exp->__anon1.op.exp2->destType->count--;
+if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
 {
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
-struct Declaration * decl;
-char temp1[1024], temp2[1024];
-
-GetTypeSpecs(a->expType, specs);
-if(a && !a->isConstant && a->type != 0)
+if(exp->__anon1.op.exp2->expType->kind == 23 || exp->__anon1.op.exp2->expType->kind == 22 || exp->__anon1.op.exp2->expType->kind == 4 || exp->__anon1.op.exp2->expType->kind == 3 || exp->__anon1.op.exp2->expType->kind == 2 || exp->__anon1.op.exp2->expType->kind == 1)
 {
-sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
-ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
-tempExp1 = QMkExpId(temp1);
-tempExp1->expType = a->expType;
-if(a->expType)
-a->expType->refCount++;
-ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
+if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
 }
-if(b && !b->isConstant && b->type != 0)
+else if(exp->__anon1.op.exp2->expType->kind == 13 || exp->__anon1.op.exp2->expType->kind == 12 || exp->__anon1.op.exp2->expType->kind == 11 || exp->__anon1.op.exp2->expType->kind == 16 || (type1->__anon1.type->kind == 0 && exp->__anon1.op.exp2->expType->kind == 8 && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered && (exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 0 || exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 1 || exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 5)))
 {
-sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
-ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
-tempExp2 = QMkExpId(temp2);
-tempExp2->expType = b->expType;
-if(b->expType)
-b->expType->refCount++;
-ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
-}
-decl = MkDeclaration(specs, decls);
-if(!curCompound->__anon1.compound.declarations)
-curCompound->__anon1.compound.declarations = MkList();
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
-}
+if(exp->__anon1.op.op == ADD_ASSIGN)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
 }
+else if((exp->__anon1.op.exp2->expType->kind == 8 && type1->kind == 13 && type1->__anon1.type->kind == 8 && type1->__anon1.type->__anon1._class == exp->__anon1.op.exp2->expType->__anon1._class && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 1))
+{
+if(exp->__anon1.op.op == ADD_ASSIGN)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
 }
-if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
+else if(inCompiler)
 {
-int op = (!strcmp(id->string, "Max")) ? '>' : '<';
+char type1String[1024];
+char type2String[1024];
 
-ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
-exp->expType = a->expType;
-if(a->expType)
-a->expType->refCount++;
+type1String[0] = '\0';
+type2String[0] = '\0';
+PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
+PrintType(type1, type2String, 0, 1);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
 }
-else if(!strcmp(id->string, "Abs"))
+}
+if(exp->__anon1.op.exp2->destType == dummy)
 {
-ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
-exp->expType = a->expType;
-if(a->expType)
-a->expType->refCount++;
+FreeType(dummy);
+exp->__anon1.op.exp2->destType = (((void *)0));
 }
-else if(!strcmp(id->string, "Sgn"))
+if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
 {
-ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '!', CopyExpression(tempExp1)))), MkListOne(MkExpConstant("0")), MkExpBrackets(MkListOne(MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpConstant("-1")), MkExpConstant("1"))))));
-exp->expType = ProcessTypeString("int", 0);
+type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+type2->refCount = 1;
+CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
+type2->isSigned = 1;
 }
-FreeExpression(tempExp1);
-if(tempExp2)
-FreeExpression(tempExp2);
-FreeIdentifier(id);
-break;
+else if(exp->__anon1.op.op == '~' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && (!exp->__anon1.op.exp2->expType->isSigned || exp->__anon1.op.exp2->expType->kind != 3))
+{
+type2 = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 3, __ecereInstance1;
+});
+type2->refCount = 1;
+type2->isSigned = 1;
 }
+else
+{
+type2 = exp->__anon1.op.exp2->expType;
+if(type2)
+type2->refCount++;
 }
 }
+dummy->kind = 0;
+if(exp->__anon1.op.op == SIZEOF)
 {
-struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-if(!exp->__anon1.call.exp->destType)
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+});
+exp->isConstant = 1;
+}
+else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
 {
-exp->__anon1.call.exp->destType = dummy;
-dummy->refCount++;
+exp->expType = Dereference(type2);
+if(type2 && type2->kind == 8)
+notByReference = 1;
 }
-ProcessExpressionType(exp->__anon1.call.exp);
-if(exp->__anon1.call.exp->destType == dummy)
+else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
+exp->expType = Reference(type2);
+else if(!assign)
 {
-FreeType(dummy);
-exp->__anon1.call.exp->destType = (((void *)0));
+if(boolOps)
+{
+if(exp->__anon1.op.exp1)
+{
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = MkClassType("bool");
+exp->__anon1.op.exp1->destType->truth = 1;
+if(!exp->__anon1.op.exp1->expType)
+ProcessExpressionType(exp->__anon1.op.exp1);
+else
+CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
+FreeType(exp->__anon1.op.exp1->expType);
+exp->__anon1.op.exp1->expType = MkClassType("bool");
+exp->__anon1.op.exp1->expType->truth = 1;
 }
-FreeType(dummy);
+if(exp->__anon1.op.exp2)
+{
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = MkClassType("bool");
+exp->__anon1.op.exp2->destType->truth = 1;
+if(!exp->__anon1.op.exp2->expType)
+ProcessExpressionType(exp->__anon1.op.exp2);
+else
+CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
+FreeType(exp->__anon1.op.exp2->expType);
+exp->__anon1.op.exp2->expType = MkClassType("bool");
+exp->__anon1.op.exp2->expType->truth = 1;
 }
-functionType = exp->__anon1.call.exp->expType;
-if(functionType && functionType->kind == 16)
+}
+else if(exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && ((useSideType) || ((!type1 || type1->kind != 8 || !strcmp(type1->__anon1._class->string, "String")) && (!type2 || type2->kind != 8 || !strcmp(type2->__anon1._class->string, "String")))))
 {
-methodType = functionType;
-functionType = methodType->__anon1.__anon3.method->dataType;
-if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
+if(type1 && type2 && ((type1->kind == 8 && type1->__anon1._class && strcmp(type1->__anon1._class->string, "String")) == (type2->kind == 8 && type2->__anon1._class && strcmp(type2->__anon1._class->string, "String"))))
 {
-char typeString[1024];
-
-typeString[0] = '\0';
+if(exp->__anon1.op.op == '-' && ((type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4) || (type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)))
 {
-struct Symbol * back = functionType->__anon1.__anon2.thisClass;
+struct Type * intType;
 
-functionType->__anon1.__anon2.thisClass = (((void *)0));
-PrintType(functionType, typeString, 1, 1);
-functionType->__anon1.__anon2.thisClass = back;
+if(!type1->__anon1._class->__anon1.registered->dataType)
+type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
+if(!type2->__anon1._class->__anon1.registered->dataType)
+type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
+intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp1->destType = intType;
+exp->__anon1.op.exp2->destType = intType;
+intType->refCount++;
 }
-if(strstr(typeString, "thisclass"))
-{
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-
+else
 {
-struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
-
-decl = SpecDeclFromString(typeString, specs, (((void *)0)));
-if(thisClass != (exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass ? exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass : exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass))
-thisClassParams = 0;
-ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1;
+type1->refCount++;
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = type2;
+type2->refCount++;
+}
+if(!boolResult && type1->kind == 8 && (!exp->destType || exp->destType->kind != 8) && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1->__anon1._class->__anon1.registered != type2->__anon1._class->__anon1.registered)
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "operating on %s and %s with an untyped result, assuming %s\n", (((void *)0))), type1->__anon1._class->string, type2->__anon1._class->string, type1->__anon1._class->string);
+if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
 {
-struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
+struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
 
-thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
-ProcessDeclarator(decl, 1);
-thisClass = backupThisClass;
-}
-thisClassParams = 1;
-functionType = ProcessType(specs, decl);
-functionType->refCount = 0;
-FinishTemplatesContext(context);
+if(argExp)
 {
-struct Type * p, * op;
+struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
 
-for(p = functionType->__anon1.__anon2.params.first, op = methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.params.first; p && op; p = p->next, op = op->next)
+exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
+ProcessExpressionType(exp->__anon1.op.exp1);
+if(type2->kind != 13)
 {
-if(op->kind == 21)
-p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
-}
-}
-if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
+ProcessExpressionType(classExp);
+exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
+if(!exp->__anon1.op.exp2->expType)
 {
-functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
-}
+if(type2)
+FreeType(type2);
+type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
+type2->refCount++;
 }
-FreeList(specs, (void *)(FreeSpecifier));
-FreeDeclarator(decl);
+ProcessExpressionType(exp->__anon1.op.exp2);
 }
 }
 }
-if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
-{
-struct Type * type = functionType->__anon1.type;
-
-if(!functionType->refCount)
+if(!boolResult && ((type1->kind == 13 || type1->kind == 12 || (type1->kind == 8 && !strcmp(type1->__anon1._class->string, "String"))) && (type2->kind == 23 || type2->kind == 22 || type2->kind == 4 || type2->kind == 3 || type2->kind == 2 || type2->kind == 1)))
 {
-functionType->__anon1.type = (((void *)0));
-FreeType(functionType);
+if(type1->kind != 8 && type1->__anon1.type->kind == 0)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
+exp->expType = type1;
+if(type1)
+type1->refCount++;
 }
-functionType = type;
+else if(!boolResult && ((type2->kind == 13 || type2->kind == 12 || (type2->kind == 8 && !strcmp(type2->__anon1._class->string, "String"))) && (type1->kind == 23 || type1->kind == 22 || type1->kind == 4 || type1->kind == 3 || type1->kind == 2 || type1->kind == 1)))
+{
+if(type2->kind != 8 && type2->__anon1.type->kind == 0)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
+exp->expType = type2;
+if(type2)
+type2->refCount++;
 }
-if(functionType && functionType->kind != 11)
+else if((type1->kind == 13 && type2->kind != 13 && type2->kind != 12 && type2->kind != 11 && type2->kind != 16 && type2->kind != 8 && type2->kind != 19) || (type2->kind == 13 && type1->kind != 13 && type1->kind != 12 && type1->kind != 11 && type1->kind != 16 && type1->kind != 8 && type1->kind != 19))
 {
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
 }
-else if(functionType)
+else
 {
-unsigned int emptyParams = 0, noParams = 0;
-struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
-struct Type * type = functionType->__anon1.__anon2.params.first;
-struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
-int extra = 0;
-struct Location oldyylloc = yylloc;
+unsigned int success = 0;
 
-if(!type)
-emptyParams = 1;
-if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
-{
-e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
-e = e->next;
-}
-if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
+if(type1->kind == 13 && type2->kind == 13)
 {
-if(memberExp && memberExp->__anon1.member.exp && memberExp->__anon1.member.exp->expType && memberExp->__anon1.member.exp->expType->kind == 19 && memberExp->__anon1.member.exp->expType->__anon1._class)
+if(exp->__anon1.op.op == '+')
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
+else if(exp->__anon1.op.op == '-')
 {
-type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
-if(e)
+if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
 {
-e->destType = type;
-e = e->next;
-type = functionType->__anon1.__anon2.params.first;
-}
-else
-type->refCount = 0;
-}
-else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
+});
+success = 1;
+if(type1->__anon1.type->kind == 20)
 {
-type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
-type->byReference = functionType->byReference;
-type->typedByReference = functionType->typedByReference;
-if(e)
+struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
+
+if(argExp)
 {
-if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
-e = e->next;
-e->destType = type;
-e = e->next;
-type = functionType->__anon1.__anon2.params.first;
+struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
+
+ProcessExpressionType(classExp);
+exp->type = 5;
+exp->__anon1.list = MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp1))), exp->__anon1.op.op, MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp2)))))), '/', MkExpMember(classExp, MkIdentifier("typeSize"))));
+ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
+FreeType(dummy);
+return ;
 }
-else
-type->refCount = 0;
 }
 }
-if(type && type->kind == 0)
-{
-noParams = 1;
-if(!type->refCount)
-FreeType(type);
-type = (((void *)0));
 }
-for(; e; e = e->next)
+}
+if(!success && exp->__anon1.op.exp1->type == 2)
 {
-if(!type && !emptyParams)
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
 {
-yylloc = e->loc;
-if(methodType && methodType->__anon1.__anon3.methodClass)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
-break;
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp1->destType;
+if(exp->__anon1.op.exp1->destType)
+exp->__anon1.op.exp1->destType->refCount++;
+success = 1;
 }
-if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
+else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
 {
-struct Type * templatedType = (((void *)0));
-struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
-int id = 0;
-
-if(_class && _class->templateArgs)
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp2->destType;
+if(exp->__anon1.op.exp2->destType)
+exp->__anon1.op.exp2->destType->refCount++;
+success = 1;
+}
+}
+else if(!success)
 {
-struct __ecereNameSpace__ecere__com__Class * sClass;
-
-for(sClass = _class; sClass; sClass = sClass->base)
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
 {
-if(sClass->templateClass)
-sClass = sClass->templateClass;
-id = 0;
-for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp2->destType;
+if(exp->__anon1.op.exp2->destType)
+exp->__anon1.op.exp2->destType->refCount++;
+success = 1;
+}
+else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
 {
-if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp1->destType;
+if(exp->__anon1.op.exp1->destType)
+exp->__anon1.op.exp1->destType->refCount++;
+success = 1;
+}
+}
+if(!success)
 {
-struct __ecereNameSpace__ecere__com__Class * nextClass;
+char expString1[10240];
+char expString2[10240];
+char type1[1024];
+char type2[1024];
 
-for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
+expString1[0] = '\0';
+expString2[0] = '\0';
+type1[0] = '\0';
+type2[0] = '\0';
+if(inCompiler)
 {
-if(nextClass->templateClass)
-nextClass = nextClass->templateClass;
-id += nextClass->templateParams.count;
+PrintExpression(exp->__anon1.op.exp1, expString1);
+__ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
+PrintExpression(exp->__anon1.op.exp2, expString2);
+__ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
+PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
+PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
 }
-break;
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
 }
-id++;
 }
-if(curParam)
-break;
 }
+else if(!boolResult && (!useSideUnit) && type2 && type1 && type2->kind == 8 && type1->kind != 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
+{
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
+if(type2->__anon1._class->__anon1.registered->dataType)
+type2->__anon1._class->__anon1.registered->dataType->refCount++;
+CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
+exp->expType = type2;
+if(type2)
+type2->refCount++;
 }
-if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
+else if(!boolResult && (!useSideUnit) && type1 && type2 && type1->kind == 8 && type2->kind != 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
 {
-unsigned int constant = type->constant;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
-
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
+if(type1->__anon1._class->__anon1.registered->dataType)
+type1->__anon1._class->__anon1.registered->dataType->refCount++;
+CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
+exp->expType = type1;
+if(type1)
+type1->refCount++;
+}
+else if(type1)
 {
-struct Context * context = SetupTemplatesContext(_class);
+unsigned int valid = 0;
 
-templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-FinishTemplatesContext(context);
+if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
+{
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+if(!type1->__anon1._class->__anon1.registered->dataType)
+type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
+exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
+exp->__anon1.op.exp2->destType->refCount++;
+CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
+if(type2)
+FreeType(type2);
+type2 = exp->__anon1.op.exp2->destType;
+if(type2)
+type2->refCount++;
+exp->expType = type2;
+type2->refCount++;
 }
-if(templatedType->kind == 8 && constant)
-templatedType->constant = 1;
-else if(templatedType->kind == 13)
+if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
 {
-struct Type * t = templatedType->__anon1.type;
-
-while(t->kind == 13)
-t = t->__anon1.type;
-if(constant)
-t->constant = constant;
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+if(!type2->__anon1._class->__anon1.registered->dataType)
+type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
+exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
+exp->__anon1.op.exp1->destType->refCount++;
+CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
+type1 = exp->__anon1.op.exp1->destType;
+exp->expType = type1;
+type1->refCount++;
 }
-e->destType = templatedType;
-if(templatedType)
+if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
 {
-templatedType->passAsTemplate = 1;
+unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
+unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
+
+if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
+{
+if(op1IsEnum && exp->__anon1.op.exp2->expType)
+{
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp2->expType;
+if(exp->__anon1.op.exp2->expType)
+exp->__anon1.op.exp2->expType->refCount++;
+valid = 1;
 }
 }
-else
+else if(op2IsEnum && exp->__anon1.op.exp1->expType)
 {
-e->destType = type;
-if(type)
-type->refCount++;
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp1->expType;
+if(exp->__anon1.op.exp1->expType)
+exp->__anon1.op.exp1->expType->refCount++;
+valid = 1;
+}
 }
 }
 else
 {
-if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
+if(op1IsEnum && exp->__anon1.op.exp2->expType)
 {
-e->destType = type->prev;
-e->destType->refCount++;
-}
-else
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
 {
-e->destType = type;
-if(type)
-type->refCount++;
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp1->expType;
+if(exp->__anon1.op.exp1->expType)
+exp->__anon1.op.exp1->expType->refCount++;
+valid = 1;
 }
 }
-if(type && type->kind != 14)
+else if(op2IsEnum && exp->__anon1.op.exp1->expType)
 {
-struct Type * next = type->next;
-
-if(!type->refCount)
-FreeType(type);
-type = next;
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp2->expType;
+if(exp->__anon1.op.exp2->expType)
+exp->__anon1.op.exp2->expType->refCount++;
+valid = 1;
 }
 }
-if(type && type->kind != 14)
+}
+}
+if(!valid)
+{
+if(type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && (type1->kind != 8 || !type1->__anon1._class || !type1->__anon1._class->__anon1.registered || type1->__anon1._class->__anon1.registered->type != 3))
+{
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = type2;
+type2->refCount++;
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
 {
-if(methodType && methodType->__anon1.__anon3.methodClass)
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
-else
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp1->destType;
+if(exp->__anon1.op.exp1->destType)
+exp->__anon1.op.exp1->destType->refCount++;
 }
-yylloc = oldyylloc;
-if(type && !type->refCount)
-FreeType(type);
 }
 else
 {
-functionType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
-});
-if(exp->__anon1.call.exp->type == 0)
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1;
+type1->refCount++;
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
 {
-char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp2->destType;
+if(exp->__anon1.op.exp2->destType)
+exp->__anon1.op.exp2->destType->refCount++;
+}
+else if(type1 && type2)
+{
+char expString1[10240];
+char expString2[10240];
+char type1String[1024];
+char type2String[1024];
 
+expString1[0] = '\0';
+expString2[0] = '\0';
+type1String[0] = '\0';
+type2String[0] = '\0';
 if(inCompiler)
 {
-struct Symbol * symbol;
-struct Location oldyylloc = yylloc;
-
-yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
-if(strstr(string, "__builtin_") == string)
+PrintExpression(exp->__anon1.op.exp1, expString1);
+__ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
+PrintExpression(exp->__anon1.op.exp2, expString2);
+__ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
+PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
+PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
+}
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
+if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
 {
-if(exp->destType)
+exp->expType = exp->__anon1.op.exp1->expType;
+if(exp->__anon1.op.exp1->expType)
+exp->__anon1.op.exp1->expType->refCount++;
+}
+else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
 {
-functionType->__anon1.__anon2.returnType = exp->destType;
-exp->destType->refCount++;
+exp->expType = exp->__anon1.op.exp2->expType;
+if(exp->__anon1.op.exp2->expType)
+exp->__anon1.op.exp2->expType->refCount++;
 }
 }
-else
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
-symbol = __extension__ ({
-struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
-
-__ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
-});
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
-if(strstr(symbol->string, "::"))
-globalContext->hasNameSpace = 1;
-yylloc = oldyylloc;
 }
 }
-else if(exp->__anon1.call.exp->type == 8)
-{
 }
-else
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
-if(!functionType->__anon1.__anon2.returnType)
+else if(type2)
 {
-functionType->__anon1.__anon2.returnType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
+{
+struct Type * oldType = exp->__anon1.op.exp1->expType;
 
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
-});
-}
+exp->__anon1.op.exp1->expType = (((void *)0));
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
+FreeType(oldType);
+else
+exp->__anon1.op.exp1->expType = oldType;
 }
-if(functionType && functionType->kind == 11)
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = type2;
+type2->refCount++;
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
 {
-exp->expType = functionType->__anon1.__anon2.returnType;
-if(functionType->__anon1.__anon2.returnType)
-functionType->__anon1.__anon2.returnType->refCount++;
-if(!functionType->refCount)
-FreeType(functionType);
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->__anon1.op.exp1->destType;
+if(exp->__anon1.op.exp1->destType)
+exp->__anon1.op.exp1->destType->refCount++;
 }
-if(exp->__anon1.call.arguments)
-{
-for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
-ProcessExpressionType(e);
 }
-break;
 }
-case 8:
-{
-struct Type * type;
-struct Location oldyylloc = yylloc;
-unsigned int thisPtr;
-struct Expression * checkExp = exp->__anon1.member.exp;
-
-while(checkExp)
+else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
 {
-if(checkExp->type == 11)
-checkExp = checkExp->__anon1.cast.exp;
-else if(checkExp->type == 5)
-checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
-else
-break;
-}
-thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
-exp->thisPtr = thisPtr;
-if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
+if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
 {
-exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
+if(exp->__anon1.op.exp1->destType)
+FreeType(exp->__anon1.op.exp1->destType);
+exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
+if(type2->__anon1._class->__anon1.registered->dataType)
+type2->__anon1._class->__anon1.registered->dataType->refCount++;
+CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
 }
-ProcessExpressionType(exp->__anon1.member.exp);
-if(exp->__anon1.member.exp->expType && exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 0)
+if(exp->__anon1.op.op == '!')
 {
-exp->isConstant = 0;
+exp->expType = MkClassType("bool");
+exp->expType->truth = 1;
 }
 else
-exp->isConstant = exp->__anon1.member.exp->isConstant;
-type = exp->__anon1.member.exp->expType;
-yylloc = exp->loc;
-if(type && (type->kind == 20))
 {
-struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
-
-if(_class)
+exp->expType = type2;
+if(type2)
+type2->refCount++;
+}
+}
+else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
 {
-for(param = _class->templateParams.first; param; param = param->next)
+if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
 {
-if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
-break;
+if(exp->__anon1.op.exp2->destType)
+FreeType(exp->__anon1.op.exp2->destType);
+exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
+if(type1->__anon1._class->__anon1.registered->dataType)
+type1->__anon1._class->__anon1.registered->dataType->refCount++;
+CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
+}
+exp->expType = type1;
+if(type1)
+type1->refCount++;
 }
 }
-if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
+yylloc = exp->loc;
+if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
 {
-struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
+char expString[10000];
 
-if(argExp)
+expString[0] = '\0';
+if(inCompiler)
 {
-struct Expression * expMember = exp->__anon1.member.exp;
-struct Declarator * decl;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-char thisClassTypeString[1024];
-
-FreeIdentifier(exp->__anon1.member.member);
-ProcessExpressionType(argExp);
+PrintExpression(exp->__anon1.op.exp1, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+}
+if(expString[0])
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
+}
+if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
 {
-char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
+char expString[10240];
 
-if(colon)
+expString[0] = '\0';
+if(inCompiler)
 {
-memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
-thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
+PrintExpression(exp->__anon1.op.exp2, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-else
-strcpy(thisClassTypeString, _class->fullName);
+if(expString[0])
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
 }
-decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
-exp->expType = ProcessType(specs, decl);
-if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
-{
-struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
-struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
-int paramCount = 0;
-int lastParam = -1;
-char templateString[1024];
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
-
-sprintf(templateString, "%s<", expClass->templateClass->fullName);
-for(cClass = expClass; cClass; cClass = cClass->base)
+if(boolResult)
 {
-int p = 0;
-
-for(param = cClass->templateParams.first; param; param = param->next)
+FreeType(exp->expType);
+exp->expType = MkClassType("bool");
+exp->expType->truth = 1;
+}
+if(exp->__anon1.op.op != SIZEOF)
+exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
+if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
 {
-int id = p;
-struct __ecereNameSpace__ecere__com__Class * sClass;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
-
-for(sClass = cClass->base; sClass; sClass = sClass->base)
-id += sClass->templateParams.count;
-arg = expClass->templateArgs[id];
-for(sClass = _class; sClass; sClass = sClass->base)
+DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
+}
+if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
+yylloc = oldyylloc;
+FreeType(dummy);
+if(type2)
+FreeType(type2);
+break;
+}
+case 5:
+case 32:
 {
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
-int p = 0;
-struct __ecereNameSpace__ecere__com__Class * nextClass;
+struct Expression * e;
 
-for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
-p += nextClass->templateParams.count;
-for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
+exp->isConstant = 1;
+for(e = (*exp->__anon1.list).first; e; e = e->next)
 {
-if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
+if(!e->next)
 {
-if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+FreeType(e->destType);
+e->opDestType = exp->opDestType;
+e->destType = exp->destType;
+if(e->destType)
 {
-arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
-arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
-break;
+exp->destType->refCount++;
 }
 }
+ProcessExpressionType(e);
+if(!exp->expType && !e->next)
+{
+exp->expType = e->expType;
+if(e->expType)
+e->expType->refCount++;
 }
+if(!e->isConstant)
+exp->isConstant = 0;
 }
+e = (*exp->__anon1.list).first;
+if(!e->next && e->type == 8)
 {
-char argument[256];
-
-argument[0] = '\0';
-switch(param->type)
-{
-case 2:
-{
-char expString[1024];
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
-struct Expression * exp;
-char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
+struct Expression * next = exp->next, * prev = exp->prev;
 
-exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
-(__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
+FreeType(exp->expType);
+FreeType(exp->destType);
+(__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
+*exp = *e;
+exp->prev = prev;
+exp->next = next;
+((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
 ProcessExpressionType(exp);
-ComputeExpression(exp);
-expString[0] = '\0';
-PrintExpression(exp, expString);
-strcat(argument, expString);
-FreeExpression(exp);
-break;
 }
-case 1:
-{
-strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
 break;
 }
-case 0:
+case 6:
 {
-if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+struct Expression * e;
+
+exp->isConstant = 1;
+ProcessExpressionType(exp->__anon1.index.exp);
+if(!exp->__anon1.index.exp->isConstant)
+exp->isConstant = 0;
+if(exp->__anon1.index.exp->expType)
 {
-if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
-strcat(argument, thisClassTypeString);
-else
-strcat(argument, arg.__anon1.__anon1.dataTypeString);
-}
-break;
-}
-}
-if(argument[0])
+struct Type * source = exp->__anon1.index.exp->expType;
+
+if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
 {
-if(paramCount)
-strcat(templateString, ", ");
-if(lastParam != p - 1)
+struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
+struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
+
+if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
 {
-strcat(templateString, param->name);
-strcat(templateString, " = ");
+exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
+if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
+{
+struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
+
+if(type->kind == 8)
+type->constant = 1;
+else if(type->kind == 13)
+{
+struct Type * t = type;
+
+while(t->kind == 13)
+t = t->__anon1.type;
+t->constant = 1;
 }
-strcat(templateString, argument);
-paramCount++;
-lastParam = p;
+((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
 }
-p++;
 }
 }
 }
+for(e = (*exp->__anon1.index.index).first; e; e = e->next)
 {
-int len = strlen(templateString);
-
-if(templateString[len - 1] == '>')
-templateString[len++] = ' ';
-templateString[len++] = '>';
-templateString[len++] = '\0';
-}
+if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
 {
-struct Context * context = SetupTemplatesContext(_class);
-
-FreeType(exp->expType);
-exp->expType = ProcessTypeString(templateString, 0);
-FinishTemplatesContext(context);
+if(e->destType)
+FreeType(e->destType);
+e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
 }
+ProcessExpressionType(e);
+if(!e->next)
+{
 }
-if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
-expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
-exp->type = 5;
-exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpBrackets(MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), expMember))), '+', MkExpOp(MkExpMember(MkExpMember(argExp, MkIdentifier("member")), MkIdentifier("offset")), '+', MkExpMember(MkExpMember(MkExpMember(CopyExpression(argExp), MkIdentifier("member")), MkIdentifier("_class")), MkIdentifier("offset")))))))));
+if(!e->isConstant)
+exp->isConstant = 0;
 }
+if(!exp->expType)
+exp->expType = Dereference(exp->__anon1.index.exp->expType);
+if(exp->expType)
+DeclareType(curExternal, exp->expType, 1, 0);
+break;
 }
-else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
+case 7:
 {
-type = ProcessTemplateParameterType(type->__anon1.templateParameter);
+struct Expression * e;
+struct Type * functionType;
+struct Type * methodType = (((void *)0));
+char name[1024];
+
+name[0] = '\0';
+if(inCompiler)
+{
+PrintExpression(exp->__anon1.call.exp, name);
+if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
+{
+PrintExpression(exp->__anon1.call.exp, name);
 }
 }
-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 == 24 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->__anon1.type->kind == 1)))
+if(exp->__anon1.call.exp->type == 0)
 {
-struct Identifier * id = exp->__anon1.member.member;
-int typeKind = type->kind;
-struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
+struct Expression * idExp = exp->__anon1.call.exp;
+struct Identifier * id = idExp->__anon1.__anon1.identifier;
 
-if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
+if(!strcmp(id->string, "__builtin_frame_address"))
 {
-_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
-typeKind = 8;
+exp->expType = ProcessTypeString("void *", 1);
+if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
+ProcessExpressionType((*exp->__anon1.call.arguments).first);
+break;
 }
-if(id)
+else if(!strcmp(id->string, "__ENDIAN_PAD"))
 {
-if(typeKind == 3 || typeKind == 15)
-_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
-else if(!_class)
+exp->expType = ProcessTypeString("int", 1);
+if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
+ProcessExpressionType((*exp->__anon1.call.arguments).first);
+break;
+}
+else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
 {
-if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
+struct Expression * a = (((void *)0));
+struct Expression * b = (((void *)0));
+struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
+
+if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
 {
-_class = type->__anon1._class->__anon1.registered;
+a = (*exp->__anon1.call.arguments).first;
+b = (*exp->__anon1.call.arguments).last;
+tempExp1 = a;
+tempExp2 = b;
 }
-else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
+else if((*exp->__anon1.call.arguments).count == 1)
 {
-_class = FindClass("char *")->__anon1.registered;
+a = (*exp->__anon1.call.arguments).first;
+tempExp1 = a;
 }
-else if(type->kind == 13)
+if(a)
 {
-_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
-FreeType(exp->expType);
-exp->expType = ProcessTypeString("uintptr", 0);
-exp->byReference = 1;
-}
-else
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
+idExp->__anon1.__anon1.identifier = (((void *)0));
+FreeExpContents(exp);
+ProcessExpressionType(a);
+if(b)
+ProcessExpressionType(b);
+exp->type = 5;
+exp->__anon1.list = MkList();
+if(a->expType && (!b || b->expType))
 {
-char string[1024] = "";
-struct Symbol * classSym;
+if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
+{
+if(inCompiler)
+{
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
+struct Declaration * decl;
+char temp1[1024], temp2[1024];
 
-PrintTypeNoConst(type, string, 0, 1);
-classSym = FindClass(string);
-if(classSym)
-_class = classSym->__anon1.registered;
+GetTypeSpecs(a->expType, specs);
+if(a && !a->isConstant && a->type != 0)
+{
+sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
+ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
+tempExp1 = QMkExpId(temp1);
+tempExp1->expType = a->expType;
+if(a->expType)
+a->expType->refCount++;
+ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
+}
+if(b && !b->isConstant && b->type != 0)
+{
+sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
+ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
+tempExp2 = QMkExpId(temp2);
+tempExp2->expType = b->expType;
+if(b->expType)
+b->expType->refCount++;
+ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
+}
+decl = MkDeclaration(specs, decls);
+if(!curCompound->__anon1.compound.declarations)
+curCompound->__anon1.compound.declarations = MkList();
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
 }
 }
 }
-if(_class && id)
+if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
 {
-struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
-struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
-struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
-struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
-struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
+int op = (!strcmp(id->string, "Max")) ? '>' : '<';
 
-if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
-exp->__anon1.member.memberType = 1;
-if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
-if(typeKind != 19)
-{
-if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
+ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
+exp->expType = a->expType;
+if(a->expType)
+a->expType->refCount++;
+}
+else if(!strcmp(id->string, "Abs"))
 {
-member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
-if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
+ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
+exp->expType = a->expType;
+if(a->expType)
+a->expType->refCount++;
+}
+else if(!strcmp(id->string, "Sgn"))
 {
-prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
-if(prop)
-member = (((void *)0));
+ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '!', CopyExpression(tempExp1)))), MkListOne(MkExpConstant("0")), MkExpBrackets(MkListOne(MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpConstant("-1")), MkExpConstant("1"))))));
+exp->expType = ProcessTypeString("int", 0);
+}
+FreeExpression(tempExp1);
+if(tempExp2)
+FreeExpression(tempExp2);
+FreeIdentifier(id);
+break;
 }
-if(!member && !prop)
-prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
-if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
-exp->__anon1.member.thisPtr = 1;
 }
-else
-{
-unsigned int useMemberForNonConst = 0;
-
-if(!id->classSym)
-{
-prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
-useMemberForNonConst = prop && exp->destType && ((exp->destType->kind == 8 && !exp->destType->constant) || ((exp->destType->kind == 13 || exp->destType->kind == 12) && exp->destType->__anon1.type && !exp->destType->__anon1.type->constant)) && !strncmp(prop->dataTypeString, "const ", 6);
-if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
-member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
 }
-if((!prop || useMemberForNonConst) && !member)
 {
-method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
-if(!method)
+struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
+
+if(!exp->__anon1.call.exp->destType)
 {
-prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
-useMemberForNonConst |= prop && exp->destType && ((exp->destType->kind == 8 && !exp->destType->constant) || ((exp->destType->kind == 13 || exp->destType->kind == 12) && exp->destType->__anon1.type && !exp->destType->__anon1.type->constant)) && !strncmp(prop->dataTypeString, "const ", 6);
-if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
-member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
-}
+exp->__anon1.call.exp->destType = dummy;
+dummy->refCount++;
 }
-if(member && prop)
+ProcessExpressionType(exp->__anon1.call.exp);
+if(exp->__anon1.call.exp->destType == dummy)
 {
-if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
-prop = (((void *)0));
-else
-member = (((void *)0));
-}
+FreeType(dummy);
+exp->__anon1.call.exp->destType = (((void *)0));
 }
+FreeType(dummy);
 }
-if(!prop && !member && !method)
-method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
-if(!prop && !member && !method)
+functionType = exp->__anon1.call.exp->expType;
+if(functionType && functionType->kind == 16)
 {
-if(typeKind == 19)
+methodType = functionType;
+functionType = methodType->__anon1.__anon3.method->dataType;
+if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
 {
-classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
-if(classProp)
+char typeString[1024];
+
+typeString[0] = '\0';
 {
-exp->__anon1.member.memberType = 5;
-exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
+struct Symbol * back = functionType->__anon1.__anon2.thisClass;
+
+functionType->__anon1.__anon2.thisClass = (((void *)0));
+PrintType(functionType, typeString, 1, 1);
+functionType->__anon1.__anon2.thisClass = back;
 }
-else
+if(strstr(typeString, "thisclass"))
 {
-char structName[1024];
-struct Identifier * id = exp->__anon1.member.member;
-struct Expression * classExp = exp->__anon1.member.exp;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
 
-type->refCount++;
-FreeType(classExp->expType);
-classExp->expType = ProcessTypeString("ecere::com::Class", 0);
-strcpy(structName, "__ecereClassData_");
-FullClassNameCat(structName, type->__anon1._class->string, 0);
-exp->type = 9;
-exp->__anon1.member.member = id;
-exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpMember(classExp, MkIdentifier("data"))), '+', MkExpMember(MkExpClass(MkListOne(MkSpecifierName(type->__anon1._class->string)), (((void *)0))), MkIdentifier("offsetClass"))))))));
-FreeType(type);
-ProcessExpressionType(exp);
-return ;
-}
-}
-else
 {
-struct Symbol * classSym = FindClass(id->string);
+struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
 
-if(classSym)
+decl = SpecDeclFromString(typeString, specs, (((void *)0)));
+if(thisClass != (exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass ? exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass : exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass))
+thisClassParams = 0;
+ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
 {
-struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
+struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
 
-if(convertClass)
-revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
-}
-}
+thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
+ProcessDeclarator(decl, 1);
+thisClass = backupThisClass;
 }
-if(exp->__anon1.member.exp->destType)
-FreeType(exp->__anon1.member.exp->destType);
+thisClassParams = 1;
+functionType = ProcessType(specs, decl);
+functionType->refCount = 0;
+FinishTemplatesContext(context);
 {
-if(method && !method->_class->symbol)
-method->_class->symbol = FindClass(method->_class->fullName);
-if(prop && !prop->_class->symbol)
-prop->_class->symbol = FindClass(prop->_class->fullName);
-exp->__anon1.member.exp->destType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+struct Type * p, * op;
 
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1->thisClassFrom = type ? type->thisClassFrom : (((void *)0)), __ecereInstance1;
-});
+for(p = functionType->__anon1.__anon2.params.first, op = methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.params.first; p && op; p = p->next, op = op->next)
+{
+if(op->kind == 21)
+p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
 }
-if(prop)
+}
+if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
 {
-exp->__anon1.member.memberType = 1;
-if(!prop->dataType)
-ProcessPropertyType(prop);
-exp->expType = prop->dataType;
-if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
+functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
+}
+}
+FreeList(specs, (void *)(FreeSpecifier));
+FreeDeclarator(decl);
+}
+}
+}
+if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
 {
-struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+struct Type * type = functionType->__anon1.type;
 
-CopyTypeInto(type, exp->expType);
-type->refCount = 1;
-type->constant = 1;
-exp->expType = type;
+if(!functionType->refCount)
+{
+functionType->__anon1.type = (((void *)0));
+FreeType(functionType);
 }
-else if(prop->dataType)
-prop->dataType->refCount++;
+functionType = type;
 }
-else if(member)
-{
-if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
+if(functionType && functionType->kind != 11)
 {
-FreeExpContents(exp);
-exp->type = 0;
-exp->__anon1.__anon1.identifier = MkIdentifier("class");
-ProcessExpressionType(exp);
-return ;
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
 }
-exp->__anon1.member.memberType = 3;
-DeclareStruct(curExternal, _class->fullName, 0, 1);
-if(member->_class != _class)
-DeclareStruct(curExternal, member->_class->fullName, 0, 1);
-if(!member->dataType)
+else if(functionType)
 {
-struct Context * context = SetupTemplatesContext(_class);
+unsigned int emptyParams = 0, noParams = 0;
+struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
+struct Type * type = functionType->__anon1.__anon2.params.first;
+struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
+int extra = 0;
+struct Location oldyylloc = yylloc;
 
-member->dataType = ProcessTypeString(member->dataTypeString, 0);
-FinishTemplatesContext(context);
-}
-exp->expType = member->dataType;
-if(member->dataType)
-member->dataType->refCount++;
-}
-else if(revConvert)
+if(!type)
+emptyParams = 1;
+if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
 {
-exp->__anon1.member.memberType = 4;
-exp->expType = MkClassType(revConvert->_class->fullName);
+e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
+e = e->next;
 }
-else if(method)
+if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
+{
+if(memberExp && memberExp->__anon1.member.exp && memberExp->__anon1.member.exp->expType && memberExp->__anon1.member.exp->expType->kind == 19 && memberExp->__anon1.member.exp->expType->__anon1._class)
 {
+type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
+if(e)
 {
-exp->__anon1.member.memberType = 2;
+e->destType = type;
+e = e->next;
+type = functionType->__anon1.__anon2.params.first;
 }
-if(!method->dataType)
-ProcessMethodType(method);
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
-});
-exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
-exp->expType->__anon1.__anon3.usedClass = _class;
+else
+type->refCount = 0;
+}
+else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
+{
+type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
+type->byReference = functionType->byReference;
+type->typedByReference = functionType->typedByReference;
+if(e)
+{
+if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
+e = e->next;
+e->destType = type;
+e = e->next;
+type = functionType->__anon1.__anon2.params.first;
 }
-else if(!classProp)
-{
-if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
+else
+type->refCount = 0;
+}
+}
+if(type && type->kind == 0)
 {
-FreeExpContents(exp);
-exp->type = 0;
-exp->__anon1.__anon1.identifier = MkIdentifier("class");
-FreeType(exp->expType);
-exp->expType = MkClassType("ecere::com::Class");
-return ;
+noParams = 1;
+if(!type->refCount)
+FreeType(type);
+type = (((void *)0));
 }
-yylloc = exp->__anon1.member.member->loc;
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
-if(inCompiler)
-__ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
+for(; e; e = e->next)
+{
+if(!type && !emptyParams)
+{
+yylloc = e->loc;
+if(methodType && methodType->__anon1.__anon3.methodClass)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
+else
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
+break;
 }
-if(_class && exp->expType)
+if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
 {
-struct __ecereNameSpace__ecere__com__Class * tClass;
+struct Type * templatedType = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
+int id = 0;
 
-tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
-while(tClass && !tClass->templateClass)
-tClass = tClass->base;
-if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
+if(_class && _class->templateArgs)
 {
-int id = 0;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
 struct __ecereNameSpace__ecere__com__Class * sClass;
 
-for(sClass = tClass; sClass; sClass = sClass->base)
+for(sClass = _class; sClass; sClass = sClass->base)
 {
-id = 0;
 if(sClass->templateClass)
 sClass = sClass->templateClass;
+id = 0;
 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
 {
-if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
+if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
 {
-for(sClass = sClass->base; sClass; sClass = sClass->base)
-id += sClass->templateParams.count;
+struct __ecereNameSpace__ecere__com__Class * nextClass;
+
+for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
+{
+if(nextClass->templateClass)
+nextClass = nextClass->templateClass;
+id += nextClass->templateParams.count;
+}
 break;
 }
 id++;
@@ -17541,182 +17306,257 @@ id++;
 if(curParam)
 break;
 }
-if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
+}
+if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
 {
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
-struct Context * context = SetupTemplatesContext(tClass);
-unsigned int constant = exp->expType->constant;
-unsigned int passAsTemplate = 0;
-struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
-struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
+unsigned int constant = type->constant;
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
 
-if(t && t->kind == 8 && t->__anon1._class)
-thisClassFrom = t->__anon1._class->__anon1.registered;
-FreeType(t);
-passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
-FreeType(exp->expType);
-exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-exp->expType->thisClassFrom = thisClassFrom;
-if(exp->expType->kind == 8 && constant)
-exp->expType->constant = 1;
-else if(exp->expType->kind == 13)
 {
-struct Type * t = exp->expType->__anon1.type;
+struct Context * context = SetupTemplatesContext(_class);
+
+templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
+FinishTemplatesContext(context);
+}
+if(templatedType->kind == 8 && constant)
+templatedType->constant = 1;
+else if(templatedType->kind == 13)
+{
+struct Type * t = templatedType->__anon1.type;
 
 while(t->kind == 13)
 t = t->__anon1.type;
 if(constant)
 t->constant = constant;
 }
-if(exp->expType)
+e->destType = templatedType;
+if(templatedType)
 {
-if(exp->expType->kind == 21)
+templatedType->passAsTemplate = 1;
+}
+}
+else
 {
-FreeType(exp->expType);
-exp->expType = ReplaceThisClassType(_class);
+e->destType = type;
+if(type)
+type->refCount++;
 }
-if(passAsTemplate)
-exp->expType->passAsTemplate = 1;
-if(!exp->destType)
+}
+else
 {
-exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-if(exp->destType->kind == 8 && constant)
-exp->destType->constant = 1;
-else if(exp->destType->kind == 13)
+if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
 {
-struct Type * t = exp->destType->__anon1.type;
+e->destType = type->prev;
+e->destType->refCount++;
+}
+else
+{
+e->destType = type;
+if(type)
+type->refCount++;
+}
+}
+if(type && type->kind != 14)
+{
+struct Type * next = type->next;
 
-while(t->kind == 13)
-t = t->__anon1.type;
-if(constant)
-t->constant = constant;
+if(!type->refCount)
+FreeType(type);
+type = next;
 }
-if(exp->destType->kind == 21)
+}
+if(type && type->kind != 14)
 {
-FreeType(exp->destType);
-exp->destType = ReplaceThisClassType(_class);
+if(methodType && methodType->__anon1.__anon3.methodClass)
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
+else
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
+}
+yylloc = oldyylloc;
+if(type && !type->refCount)
+FreeType(type);
 }
+else
+{
+functionType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
+});
+if(exp->__anon1.call.exp->type == 0)
+{
+char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
+
+if(inCompiler)
+{
+struct Symbol * symbol;
+struct Location oldyylloc = yylloc;
+
+yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
+if(strstr(string, "__builtin_") == string)
+{
+if(exp->destType)
+{
+functionType->__anon1.__anon2.returnType = exp->destType;
+exp->destType->refCount++;
 }
 }
-FinishTemplatesContext(context);
+else
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
+symbol = __extension__ ({
+struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
+
+__ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
+});
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
+if(strstr(symbol->string, "::"))
+globalContext->hasNameSpace = 1;
+yylloc = oldyylloc;
 }
 }
-else if(tClass && exp->expType->kind == 13 && exp->expType->__anon1.type && exp->expType->__anon1.type->kind == 20 && exp->expType->__anon1.type->__anon1.templateParameter->type == 0)
+else if(exp->__anon1.call.exp->type == 8)
 {
-int id = 0;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
-struct __ecereNameSpace__ecere__com__Class * sClass;
+}
+else
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
+if(!functionType->__anon1.__anon2.returnType)
+{
+functionType->__anon1.__anon2.returnType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-for(sClass = tClass; sClass; sClass = sClass->base)
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
+});
+}
+}
+if(functionType && functionType->kind == 11)
 {
-id = 0;
-if(sClass->templateClass)
-sClass = sClass->templateClass;
-for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
+exp->expType = functionType->__anon1.__anon2.returnType;
+if(functionType->__anon1.__anon2.returnType)
+functionType->__anon1.__anon2.returnType->refCount++;
+if(!functionType->refCount)
+FreeType(functionType);
+}
+if(exp->__anon1.call.arguments)
 {
-if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
+for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
+ProcessExpressionType(e);
+}
+break;
+}
+case 8:
 {
-for(sClass = sClass->base; sClass; sClass = sClass->base)
-id += sClass->templateParams.count;
+struct Type * type;
+struct Location oldyylloc = yylloc;
+unsigned int thisPtr;
+struct Expression * checkExp = exp->__anon1.member.exp;
+
+while(checkExp)
+{
+if(checkExp->type == 11)
+checkExp = checkExp->__anon1.cast.exp;
+else if(checkExp->type == 5)
+checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
+else
 break;
 }
-id++;
+thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
+exp->thisPtr = thisPtr;
+if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
+{
+exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
 }
-if(curParam)
-break;
+ProcessExpressionType(exp->__anon1.member.exp);
+if(exp->__anon1.member.exp->expType && exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 0)
+{
+exp->isConstant = 0;
 }
-if(curParam)
+else
+exp->isConstant = exp->__anon1.member.exp->isConstant;
+type = exp->__anon1.member.exp->expType;
+yylloc = exp->loc;
+if(type && (type->kind == 20))
 {
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
-struct Context * context = SetupTemplatesContext(tClass);
-struct Type * basicType;
+struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
 
-basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-if(basicType)
+if(_class)
 {
-if(basicType->kind == 21)
+for(param = _class->templateParams.first; param; param = param->next)
 {
-FreeType(basicType);
-basicType = ReplaceThisClassType(_class);
+if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
+break;
 }
-FreeType(exp->expType);
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
-});
-if(!exp->destType)
-{
-exp->destType = exp->expType;
-exp->destType->refCount++;
 }
+if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
 {
-struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
+
+if(argExp)
+{
+struct Expression * expMember = exp->__anon1.member.exp;
 struct Declarator * decl;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+char thisClassTypeString[1024];
 
-decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
-*newExp = *exp;
-if(exp->destType)
-exp->destType->refCount++;
-if(exp->expType)
-exp->expType->refCount++;
-exp->type = 11;
-exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
-exp->__anon1.cast.exp = newExp;
-}
-}
-FinishTemplatesContext(context);
+FreeIdentifier(exp->__anon1.member.member);
+ProcessExpressionType(argExp);
+{
+char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
+
+if(colon)
+{
+memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
+thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
 }
+else
+strcpy(thisClassTypeString, _class->fullName);
 }
-else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
+decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
+exp->expType = ProcessType(specs, decl);
+if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
 {
 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
-
-if(expClass)
-{
 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
-int p = 0;
 int paramCount = 0;
 int lastParam = -1;
 char templateString[1024];
 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
 
 sprintf(templateString, "%s<", expClass->templateClass->fullName);
-while(cClass != expClass)
+for(cClass = expClass; cClass; cClass = cClass->base)
 {
-struct __ecereNameSpace__ecere__com__Class * sClass;
+int p = 0;
 
-for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
-;
-cClass = sClass;
 for(param = cClass->templateParams.first; param; param = param->next)
 {
-struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
-int cp = 0;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
+int id = p;
+struct __ecereNameSpace__ecere__com__Class * sClass;
 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
 
-while(cClassCur != tClass && !paramCur)
+for(sClass = cClass->base; sClass; sClass = sClass->base)
+id += sClass->templateParams.count;
+arg = expClass->templateArgs[id];
+for(sClass = _class; sClass; sClass = sClass->base)
 {
-struct __ecereNameSpace__ecere__com__Class * sClassCur;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
+int p = 0;
+struct __ecereNameSpace__ecere__com__Class * nextClass;
 
-for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
-;
-cClassCur = sClassCur;
-for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
+for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
+p += nextClass->templateParams.count;
+for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
 {
-if(!strcmp(paramCur->name, param->name))
+if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
 {
+if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+{
+arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
+arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
 break;
 }
-cp++;
 }
 }
-if(paramCur && paramCur->type == 0)
-arg = tClass->templateArgs[cp];
-else
-arg = expClass->templateArgs[p];
+}
 {
 char argument[256];
 
@@ -17749,7 +17589,12 @@ break;
 case 0:
 {
 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+{
+if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
+strcat(argument, thisClassTypeString);
+else
 strcat(argument, arg.__anon1.__anon1.dataTypeString);
+}
 break;
 }
 }
@@ -17757,646 +17602,581 @@ if(argument[0])
 {
 if(paramCount)
 strcat(templateString, ", ");
-if(lastParam != p - 1)
-{
-strcat(templateString, param->name);
-strcat(templateString, " = ");
-}
-strcat(templateString, argument);
-paramCount++;
-lastParam = p;
-}
-}
-p++;
-}
-}
-{
-int len = strlen(templateString);
-
-if(templateString[len - 1] == '>')
-templateString[len++] = ' ';
-templateString[len++] = '>';
-templateString[len++] = '\0';
-}
-FreeType(exp->expType);
-{
-struct Context * context = SetupTemplatesContext(tClass);
-
-exp->expType = ProcessTypeString(templateString, 0);
-FinishTemplatesContext(context);
-}
-}
-}
-}
-}
-else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "undefined class %s\n", (((void *)0))), (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->string : (type->__anon1._class ? type->__anon1._class->string : (((void *)0)))) : "(null)");
-}
-else if(type && (type->kind == 9 || type->kind == 10))
-{
-struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
-
-if(memberType)
-{
-exp->expType = memberType;
-if(memberType)
-memberType->refCount++;
-}
-}
-else
-{
-char expString[10240];
-
-expString[0] = '\0';
-if(inCompiler)
-{
-PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
-}
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
-}
-if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
-{
-if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
-{
-struct Identifier * id = exp->__anon1.member.member;
-struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
-
-if(_class)
-{
-FreeType(exp->expType);
-exp->expType = ReplaceThisClassType(_class);
-}
-}
-}
-yylloc = oldyylloc;
-break;
-}
-case 9:
-{
-struct Type * destType = exp->destType;
-
-if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
-{
-exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
-}
-exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
-exp->type = 8;
-if(destType)
-destType->count++;
-ProcessExpressionType(exp);
-if(destType)
-destType->count--;
-break;
-}
-case 15:
-{
-struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
-
-if(classSym && classSym->__anon1.registered)
-{
-if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
-{
-char name[1024];
-struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
-
-name[0] = '\0';
-DeclareStruct(curExternal, classSym->string, 0, 1);
-FreeSpecifier(exp->__anon1._class);
-FullClassNameCat(name, classSym->string, 0);
-if(b->offset == 0)
-{
-exp->type = 10;
-exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
-}
-else
-{
-struct Expression * e;
-
-exp->type = 4;
-if(b->structSize == b->offset)
-exp->__anon1.op.exp1 = MkExpConstant("0");
-else
-exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
-exp->__anon1.op.op = '+';
-e = exp;
-while(b->offset != 0)
-{
-struct Symbol * sym;
-struct Expression * typeSize;
-
-b = b->base;
-sym = FindClass(b->fullName);
-name[0] = '\0';
-DeclareStruct(curExternal, sym->string, 0, 1);
-FullClassNameCat(name, sym->string, 0);
-if(b->structSize == b->offset)
-typeSize = MkExpConstant("0");
-else
-typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
-e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
-e = e->__anon1.op.exp2;
-}
-}
-}
-else
-{
-if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
+if(lastParam != p - 1)
 {
-FreeSpecifier(exp->__anon1._class);
-exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
-exp->type = 2;
+strcat(templateString, param->name);
+strcat(templateString, " = ");
 }
-else
-{
-char className[1024];
-
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(curExternal, classSym, className);
-FreeExpContents(exp);
-exp->type = 9;
-exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
-exp->__anon1.member.member = MkIdentifier("structSize");
+strcat(templateString, argument);
+paramCount++;
+lastParam = p;
 }
+p++;
 }
 }
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
-});
-break;
 }
-case 10:
 {
-struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
-
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+int len = strlen(templateString);
 
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
-});
-exp->isConstant = 1;
-DeclareType(curExternal, type, 1, 0);
-FreeType(type);
-break;
+if(templateString[len - 1] == '>')
+templateString[len++] = ' ';
+templateString[len++] = '>';
+templateString[len++] = '\0';
 }
-case 11:
-{
-struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
-
-type->count = 1;
-FreeType(exp->__anon1.cast.exp->destType);
-exp->__anon1.cast.exp->destType = type;
-type->refCount++;
-type->casted = 1;
-ProcessExpressionType(exp->__anon1.cast.exp);
-type->casted = 0;
-type->count = 0;
-exp->expType = type;
-if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
 {
-void * prev = exp->prev, * next = exp->next;
-struct Type * expType = exp->__anon1.cast.exp->destType;
-struct Expression * castExp = exp->__anon1.cast.exp;
-struct Type * destType = exp->destType;
+struct Context * context = SetupTemplatesContext(_class);
 
-if(expType)
-expType->refCount++;
 FreeType(exp->expType);
-FreeTypeName(exp->__anon1.cast.typeName);
-*exp = *castExp;
-FreeType(exp->expType);
-FreeType(exp->destType);
-exp->expType = expType;
-exp->destType = destType;
-((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
-exp->prev = prev;
-exp->next = next;
+exp->expType = ProcessTypeString(templateString, 0);
+FinishTemplatesContext(context);
 }
-else
-{
-exp->isConstant = exp->__anon1.cast.exp->isConstant;
 }
-break;
+if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
+expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
+exp->type = 5;
+exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpBrackets(MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), expMember))), '+', MkExpOp(MkExpMember(MkExpMember(argExp, MkIdentifier("member")), MkIdentifier("offset")), '+', MkExpMember(MkExpMember(MkExpMember(CopyExpression(argExp), MkIdentifier("member")), MkIdentifier("_class")), MkIdentifier("offset")))))))));
 }
-case 33:
+}
+else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
 {
-struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
-
-exp->expType = type;
-break;
+type = ProcessTemplateParameterType(type->__anon1.templateParameter);
 }
-case 34:
+}
+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 == 24 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->__anon1.type->kind == 1)))
 {
-struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
+struct Identifier * id = exp->__anon1.member.member;
+int typeKind = type->kind;
+struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
 
-ProcessExpressionType(exp->__anon1.vaArg.exp);
-exp->expType = type;
-break;
+if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
+{
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
+typeKind = 8;
 }
-case 12:
+if(id)
 {
-struct Expression * e;
-struct Type * t = exp->destType;
-
-if(t && !exp->destType->casted)
+if(typeKind == 3 || typeKind == 15)
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
+else if(!_class)
 {
-t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-CopyTypeInto(t, exp->destType);
-t->count = 0;
+if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
+{
+_class = type->__anon1._class->__anon1.registered;
 }
-else if(t)
-t->refCount++;
-exp->isConstant = 1;
-FreeType(exp->__anon1.cond.cond->destType);
-exp->__anon1.cond.cond->destType = MkClassType("bool");
-exp->__anon1.cond.cond->destType->truth = 1;
-ProcessExpressionType(exp->__anon1.cond.cond);
-if(!exp->__anon1.cond.cond->isConstant)
-exp->isConstant = 0;
-for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
+else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
 {
-if(!e->next)
+_class = FindClass("char *")->__anon1.registered;
+}
+else if(type->kind == 13)
 {
-FreeType(e->destType);
-e->destType = t;
-if(e->destType)
-e->destType->refCount++;
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
+FreeType(exp->expType);
+exp->expType = ProcessTypeString("uintptr", 0);
+exp->byReference = 1;
 }
-ProcessExpressionType(e);
-if(!e->next)
+else
 {
-exp->expType = e->expType;
-if(e->expType)
-e->expType->refCount++;
+char string[1024] = "";
+struct Symbol * classSym;
+
+PrintTypeNoConst(type, string, 0, 1);
+classSym = FindClass(string);
+if(classSym)
+_class = classSym->__anon1.registered;
 }
-if(!e->isConstant)
-exp->isConstant = 0;
 }
-FreeType(exp->__anon1.cond.elseExp->destType);
-exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
-if(exp->__anon1.cond.elseExp->destType)
-exp->__anon1.cond.elseExp->destType->refCount++;
-ProcessExpressionType(exp->__anon1.cond.elseExp);
-if(!exp->__anon1.cond.elseExp->isConstant)
-exp->isConstant = 0;
-FreeType(t);
-break;
 }
-case 23:
-{
-if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
+if(_class && id)
 {
-struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
+struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
+struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
+struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
+struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
+struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
 
-if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
+if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
+exp->__anon1.member.memberType = 1;
+if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
+if(typeKind != 19)
 {
-((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
-if(exp->destType)
-exp->destType->refCount++;
-}
-ProcessStatement(exp->__anon1.compound);
-exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
-if(exp->expType)
-exp->expType->refCount++;
+if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
+{
+member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
+if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
+{
+prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
+if(prop)
+member = (((void *)0));
 }
-break;
+if(!member && !prop)
+prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
+if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
+exp->__anon1.member.thisPtr = 1;
 }
-case 24:
+else
 {
-struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
+unsigned int useMemberForNonConst = 0;
 
-if(spec && spec->type == 1)
+if(!id->classSym)
 {
-exp->expType = MkClassType(spec->__anon1.__anon1.name);
-exp->expType->kind = 19;
-exp->byReference = 1;
+prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
+useMemberForNonConst = prop && exp->destType && ((exp->destType->kind == 8 && !exp->destType->constant) || ((exp->destType->kind == 13 || exp->destType->kind == 12) && exp->destType->__anon1.type && !exp->destType->__anon1.type->constant)) && !strncmp(prop->dataTypeString, "const ", 6);
+if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
+member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
 }
-else
+if((!prop || useMemberForNonConst) && !member)
 {
-exp->expType = MkClassType("ecere::com::Class");
-exp->byReference = 1;
+method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
+if(!method)
+{
+prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
+useMemberForNonConst |= prop && exp->destType && ((exp->destType->kind == 8 && !exp->destType->constant) || ((exp->destType->kind == 13 || exp->destType->kind == 12) && exp->destType->__anon1.type && !exp->destType->__anon1.type->constant)) && !strncmp(prop->dataTypeString, "const ", 6);
+if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
+member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
 }
-break;
 }
-case 25:
+if(member && prop)
 {
-struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
-
-if(_class)
+if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
+prop = (((void *)0));
+else
+member = (((void *)0));
+}
+}
+}
+if(!prop && !member && !method)
+method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
+if(!prop && !member && !method)
+{
+if(typeKind == 19)
+{
+classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
+if(classProp)
+{
+exp->__anon1.member.memberType = 5;
+exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
+}
+else
 {
-struct Identifier * id = exp->__anon1.classData.id;
 char structName[1024];
-struct Expression * classExp;
+struct Identifier * id = exp->__anon1.member.member;
+struct Expression * classExp = exp->__anon1.member.exp;
 
+type->refCount++;
+FreeType(classExp->expType);
+classExp->expType = ProcessTypeString("ecere::com::Class", 0);
 strcpy(structName, "__ecereClassData_");
-FullClassNameCat(structName, _class->fullName, 0);
+FullClassNameCat(structName, type->__anon1._class->string, 0);
 exp->type = 9;
 exp->__anon1.member.member = id;
-if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
-classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
-else
-classExp = MkExpIdentifier(MkIdentifier("class"));
-exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpMember(classExp, MkIdentifier("data"))), '+', MkExpMember(MkExpClass(MkListOne(MkSpecifierName(_class->fullName)), (((void *)0))), MkIdentifier("offsetClass"))))))));
+exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpMember(classExp, MkIdentifier("data"))), '+', MkExpMember(MkExpClass(MkListOne(MkSpecifierName(type->__anon1._class->string)), (((void *)0))), MkIdentifier("offsetClass"))))))));
+FreeType(type);
 ProcessExpressionType(exp);
 return ;
 }
-break;
 }
-case 35:
+else
 {
-struct Type * type = (((void *)0));
-const char * typeString = (((void *)0));
-char typeStringBuf[1024];
+struct Symbol * classSym = FindClass(id->string);
 
-if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(exp->destType->__anon1._class->__anon1.registered, containerClass))
+if(classSym)
 {
-struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
+struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
 
-typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
+if(convertClass)
+revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
 }
-else if(exp->__anon1.list)
+}
+}
+if(exp->__anon1.member.exp->destType)
+FreeType(exp->__anon1.member.exp->destType);
 {
-struct Expression * e;
+if(method && !method->_class->symbol)
+method->_class->symbol = FindClass(method->_class->fullName);
+if(prop && !prop->_class->symbol)
+prop->_class->symbol = FindClass(prop->_class->fullName);
+exp->__anon1.member.exp->destType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-for(e = (*exp->__anon1.list).first; e; e = e->next)
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1->thisClassFrom = type ? type->thisClassFrom : (((void *)0)), __ecereInstance1;
+});
+}
+if(prop)
 {
-ProcessExpressionType(e);
-if(e->expType)
+exp->__anon1.member.memberType = 1;
+if(!prop->dataType)
+ProcessPropertyType(prop);
+exp->expType = prop->dataType;
+if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
 {
-if(!type)
+struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+CopyTypeInto(type, exp->expType);
+type->refCount = 1;
+type->constant = 1;
+exp->expType = type;
+}
+else if(prop->dataType)
+prop->dataType->refCount++;
+}
+else if(member)
 {
-type = e->expType;
-type->refCount++;
+if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
+{
+FreeExpContents(exp);
+exp->type = 0;
+exp->__anon1.__anon1.identifier = MkIdentifier("class");
+ProcessExpressionType(exp);
+return ;
 }
-else
+exp->__anon1.member.memberType = 3;
+DeclareStruct(curExternal, _class->fullName, 0, 1);
+if(member->_class != _class)
+DeclareStruct(curExternal, member->_class->fullName, 0, 1);
+if(!member->dataType)
 {
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+struct Context * context = SetupTemplatesContext(_class);
+
+member->dataType = ProcessTypeString(member->dataTypeString, 0);
+FinishTemplatesContext(context);
+}
+exp->expType = member->dataType;
+if(member->dataType)
+member->dataType->refCount++;
+}
+else if(revConvert)
 {
-FreeType(type);
-type = e->expType;
-e->expType = (((void *)0));
-e = (*exp->__anon1.list).first;
-ProcessExpressionType(e);
-if(e->expType)
+exp->__anon1.member.memberType = 4;
+exp->expType = MkClassType(revConvert->_class->fullName);
+}
+else if(method)
 {
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
-FreeType(type);
-type = (((void *)0));
-break;
+exp->__anon1.member.memberType = 2;
 }
+if(!method->dataType)
+ProcessMethodType(method);
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
+});
+exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
+exp->expType->__anon1.__anon3.usedClass = _class;
 }
+else if(!classProp)
+{
+if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
+{
+FreeExpContents(exp);
+exp->type = 0;
+exp->__anon1.__anon1.identifier = MkIdentifier("class");
+FreeType(exp->expType);
+exp->expType = MkClassType("ecere::com::Class");
+return ;
 }
+yylloc = exp->__anon1.member.member->loc;
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
+if(inCompiler)
+__ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
 }
-if(e->expType)
+if(_class && exp->expType)
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * tClass;
+
+tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
+while(tClass && !tClass->templateClass)
+tClass = tClass->base;
+if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
+{
+int id = 0;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * sClass;
+
+for(sClass = tClass; sClass; sClass = sClass->base)
+{
+id = 0;
+if(sClass->templateClass)
+sClass = sClass->templateClass;
+for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
+{
+if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
+{
+for(sClass = sClass->base; sClass; sClass = sClass->base)
+id += sClass->templateParams.count;
+break;
 }
+id++;
 }
+if(curParam)
+break;
 }
-if(type)
+if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
 {
-typeStringBuf[0] = '\0';
-PrintTypeNoConst(type, typeStringBuf, 0, 1);
-typeString = typeStringBuf;
-FreeType(type);
-type = (((void *)0));
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
+struct Context * context = SetupTemplatesContext(tClass);
+unsigned int constant = exp->expType->constant;
+unsigned int passAsTemplate = 0;
+struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
+struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
+
+if(t && t->kind == 8 && t->__anon1._class)
+thisClassFrom = t->__anon1._class->__anon1.registered;
+FreeType(t);
+passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
+FreeType(exp->expType);
+exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
+exp->expType->thisClassFrom = thisClassFrom;
+if(exp->expType->kind == 8 && constant)
+exp->expType->constant = 1;
+else if(exp->expType->kind == 13)
+{
+struct Type * t = exp->expType->__anon1.type;
+
+while(t->kind == 13)
+t = t->__anon1.type;
+if(constant)
+t->constant = constant;
 }
+if(exp->expType)
+{
+if(exp->expType->kind == 21)
+{
+FreeType(exp->expType);
+exp->expType = ReplaceThisClassType(_class);
 }
-if(typeString)
+if(passAsTemplate)
+exp->expType->passAsTemplate = 1;
+if(!exp->destType)
 {
-char templateString[1024];
-struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
-struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Expression * expExt;
-struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
-
-sprintf(templateString, "Container<%s>", typeString);
-if(exp->__anon1.list)
+exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
+if(exp->destType->kind == 8 && constant)
+exp->destType->constant = 1;
+else if(exp->destType->kind == 13)
 {
-struct Expression * e;
+struct Type * t = exp->destType->__anon1.type;
 
-type = ProcessTypeString(typeString, 0);
-while((e = (*exp->__anon1.list).first))
+while(t->kind == 13)
+t = t->__anon1.type;
+if(constant)
+t->constant = constant;
+}
+if(exp->destType->kind == 21)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
-e->destType = type;
-type->refCount++;
-ProcessExpressionType(e);
-ListAdd(initializers, MkInitializerAssignment(e));
+FreeType(exp->destType);
+exp->destType = ReplaceThisClassType(_class);
 }
-FreeType(type);
-(__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
 }
-DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
-ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
-ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
-ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
-ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
-ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
-ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
-ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
-ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
-ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
-struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
-
-__ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
-})));
-ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
-ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
-ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
-exp->expType = ProcessTypeString(templateString, 0);
-exp->type = 5;
-exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
-ProcessExpressionType(expExt);
 }
-else
-{
-exp->expType = ProcessTypeString("Container", 0);
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
+FinishTemplatesContext(context);
+}
 }
+else if(tClass && exp->expType->kind == 13 && exp->expType->__anon1.type && exp->expType->__anon1.type->kind == 20 && exp->expType->__anon1.type->__anon1.templateParameter->type == 0)
+{
+int id = 0;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * sClass;
+
+for(sClass = tClass; sClass; sClass = sClass->base)
+{
+id = 0;
+if(sClass->templateClass)
+sClass = sClass->templateClass;
+for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
+{
+if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
+{
+for(sClass = sClass->base; sClass; sClass = sClass->base)
+id += sClass->templateParams.count;
 break;
 }
+id++;
 }
-if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
-{
-FreeType(exp->expType);
-exp->expType = ReplaceThisClassType(thisClass);
+if(curParam)
+break;
 }
-if(exp->expType && (exp->expType->kind == 9 || exp->expType->kind == 10 || exp->expType->kind == 15) && !exp->expType->__anon1.__anon1.members.first && exp->expType->__anon1.__anon1.enumName)
+if(curParam)
 {
-struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
+struct Context * context = SetupTemplatesContext(tClass);
+struct Type * basicType;
 
-if(symbol)
+basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
+if(basicType)
 {
-if(exp->expType->kind != 15)
+if(basicType->kind == 21)
 {
-struct Type * member;
-char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
-
-FreeType(exp->expType);
-exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-exp->expType->kind = symbol->type->kind;
-exp->expType->refCount++;
-exp->expType->__anon1.__anon1.enumName = enumName;
-exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
-for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
-member->refCount++;
+FreeType(basicType);
+basicType = ReplaceThisClassType(_class);
 }
-else
-{
-struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
+FreeType(exp->expType);
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
+});
+if(!exp->destType)
 {
-struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__sys__NamedLink64)), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
+exp->destType = exp->expType;
+exp->destType->refCount++;
+}
+{
+struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
 
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
+decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
+*newExp = *exp;
+if(exp->destType)
+exp->destType->refCount++;
+if(exp->expType)
+exp->expType->refCount++;
+exp->type = 11;
+exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
+exp->__anon1.cast.exp = newExp;
 }
 }
+FinishTemplatesContext(context);
 }
 }
-yylloc = exp->loc;
-if(exp->destType && (exp->destType->kind == 18))
-;
-else if(exp->destType && !exp->destType->keepCast)
-{
-if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
-exp->needTemplateCast = 1;
-if(exp->destType->kind == 0)
-;
-else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
+else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
 {
-unsigned int invalidCast = 0;
+struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
 
-if(inCompiler && exp->destType->count && exp->expType)
+if(expClass)
 {
-struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
-struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
+int p = 0;
+int paramCount = 0;
+int lastParam = -1;
+char templateString[1024];
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
 
-if(c1 && c1->type != 1)
-c1 = (((void *)0));
-if(c2 && c2->type != 1)
-c2 = (((void *)0));
-if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
-invalidCast = 1;
-}
-if(!exp->destType->count || unresolved || invalidCast)
-{
-if(!exp->expType)
-{
-yylloc = exp->loc;
-if(exp->destType->kind != 14)
+sprintf(templateString, "%s<", expClass->templateClass->fullName);
+while(cClass != expClass)
 {
-char type2[1024];
+struct __ecereNameSpace__ecere__com__Class * sClass;
 
-type2[0] = '\0';
-if(inCompiler)
+for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
+;
+cClass = sClass;
+for(param = cClass->templateParams.first; param; param = param->next)
 {
-char expString[10240];
+struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
+int cp = 0;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
 
-expString[0] = '\0';
-PrintType(exp->destType, type2, 0, 1);
-if(inCompiler)
-{
-PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
-}
-if(unresolved)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
-else if(exp->type != 16)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
-}
-}
-else
+while(cClassCur != tClass && !paramCur)
 {
-char expString[10240];
+struct __ecereNameSpace__ecere__com__Class * sClassCur;
 
-expString[0] = '\0';
-if(inCompiler)
+for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
+;
+cClassCur = sClassCur;
+for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
 {
-PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+if(!strcmp(paramCur->name, param->name))
+{
+break;
 }
-if(unresolved)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
-else if(exp->type != 16)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
+cp++;
 }
 }
+if(paramCur && paramCur->type == 0)
+arg = tClass->templateArgs[cp];
 else
+arg = expClass->templateArgs[p];
 {
-char type1[1024];
-char type2[1024];
+char argument[256];
 
-type1[0] = '\0';
-type2[0] = '\0';
-if(inCompiler)
+argument[0] = '\0';
+switch(param->type)
 {
-PrintType(exp->expType, type1, 0, 1);
-PrintType(exp->destType, type2, 0, 1);
-}
-if(exp->destType->truth && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && !strcmp(exp->destType->__anon1._class->__anon1.registered->name, "bool") && exp->expType->kind != 0 && exp->expType->kind != 9 && exp->expType->kind != 10 && (exp->expType->kind != 8 || exp->expType->classObjectType || (exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type != 1)))
-;
-else
+case 2:
 {
-char expString[10240];
+char expString[1024];
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
+struct Expression * exp;
+char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
 
+exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
+(__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
+ProcessExpressionType(exp);
+ComputeExpression(exp);
 expString[0] = '\0';
-if(inCompiler)
-{
 PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+strcat(argument, expString);
+FreeExpression(exp);
+break;
 }
-if(!sourceFile || (!strstr(sourceFile, "src\\lexer.ec") && !strstr(sourceFile, "src/lexer.ec") && !strstr(sourceFile, "src\\grammar.ec") && !strstr(sourceFile, "src/grammar.ec") && !strstr(sourceFile, "src\\type.ec") && !strstr(sourceFile, "src/type.ec") && !strstr(sourceFile, "src\\expression.ec") && !strstr(sourceFile, "src/expression.ec")))
+case 1:
 {
-if(invalidCast)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
-else
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
+strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
+break;
 }
-if(!inCompiler)
+case 0:
 {
-FreeType(exp->expType);
-exp->destType->refCount++;
-exp->expType = exp->destType;
+if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+strcat(argument, arg.__anon1.__anon1.dataTypeString);
+break;
+}
+}
+if(argument[0])
+{
+if(paramCount)
+strcat(templateString, ", ");
+if(lastParam != p - 1)
+{
+strcat(templateString, param->name);
+strcat(templateString, " = ");
 }
+strcat(templateString, argument);
+paramCount++;
+lastParam = p;
 }
 }
+p++;
 }
 }
-else if(exp->destType && exp->destType->kind == 13 && exp->destType->__anon1.type && exp->destType->__anon1.type->kind == 11 && exp->expType && (exp->expType->kind == 11 || exp->expType->kind == 16))
 {
-struct Expression * nbExp = GetNonBracketsExp(exp);
+int len = strlen(templateString);
 
-if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
+if(templateString[len - 1] == '>')
+templateString[len++] = ' ';
+templateString[len++] = '>';
+templateString[len++] = '\0';
+}
+FreeType(exp->expType);
 {
-struct Expression * e = MoveExpContents(exp);
+struct Context * context = SetupTemplatesContext(tClass);
 
-exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
-exp->type = 11;
-exp->__anon1.cast.exp->destType = exp->destType;
-if(exp->destType)
-exp->destType->refCount++;
-exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
+exp->expType = ProcessTypeString(templateString, 0);
+FinishTemplatesContext(context);
+}
 }
 }
 }
-else if(unresolved)
+}
+else
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "undefined class %s\n", (((void *)0))), (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->string : (type->__anon1._class ? type->__anon1._class->string : (((void *)0)))) : "(null)");
+}
+else if(type && (type->kind == 9 || type->kind == 10))
 {
-if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s::%s\n", (((void *)0))), exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name, exp->__anon1.__anon1.identifier->string);
-else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
+struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
+
+if(memberType)
+{
+exp->expType = memberType;
+if(memberType)
+memberType->refCount++;
 }
-else if(!exp->expType && exp->type != 16)
+}
+else
 {
 char expString[10240];
 
@@ -18406,767 +18186,991 @@ if(inCompiler)
 PrintExpression(exp, expString);
 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
 }
-if(inCompiler)
-ApplyAnyObjectLogic(exp);
-if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 5 && (!exp->destType || (exp->destType->kind != 3 && exp->destType->kind != 4 && exp->destType->kind != 22 && exp->destType->kind != 23 && exp->destType->kind != 5 && exp->destType->kind != 2 && exp->destType->kind != 1 && exp->destType->kind != 24)))
+if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
 {
-exp->byReference = 1;
+if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
+{
+struct Identifier * id = exp->__anon1.member.member;
+struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
+
+if(_class)
+{
+FreeType(exp->expType);
+exp->expType = ReplaceThisClassType(_class);
+}
+}
 }
 yylloc = oldyylloc;
+break;
 }
+case 9:
+{
+struct Type * destType = exp->destType;
 
-static void ProcessFunction(struct FunctionDefinition * function)
+if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
 {
-struct Identifier * id = GetDeclId(function->declarator);
-struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
-struct Type * type = symbol ? symbol->type : (((void *)0));
-struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
-struct Context * oldTopContext = topContext;
+exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
+}
+exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
+exp->type = 8;
+if(destType)
+destType->count++;
+ProcessExpressionType(exp);
+if(destType)
+destType->count--;
+break;
+}
+case 15:
+{
+struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
 
-yylloc = function->loc;
-if(type && type->__anon1.__anon2.thisClass)
+if(classSym && classSym->__anon1.registered)
 {
-struct Symbol * classSym = type->__anon1.__anon2.thisClass;
-struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
-char className[1024];
-char structName[1024];
-struct Declarator * funcDecl;
-struct Symbol * thisSymbol;
-unsigned int typedObject = 0;
+if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
+{
+char name[1024];
+struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
 
-if(_class && !_class->base)
+name[0] = '\0';
+DeclareStruct(curExternal, classSym->string, 0, 1);
+FreeSpecifier(exp->__anon1._class);
+FullClassNameCat(name, classSym->string, 0);
+if(b->offset == 0)
 {
-_class = currentClass;
-if(_class && !_class->symbol)
-_class->symbol = FindClass(_class->fullName);
-classSym = _class ? _class->symbol : (((void *)0));
-typedObject = 1;
+exp->type = 10;
+exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
 }
-thisClass = _class;
-if(inCompiler && _class)
-{
-if(type->kind == 11)
+else
 {
-if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
+struct Expression * e;
+
+exp->type = 4;
+if(b->structSize == b->offset)
+exp->__anon1.op.exp1 = MkExpConstant("0");
+else
+exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
+exp->__anon1.op.op = '+';
+e = exp;
+while(b->offset != 0)
 {
-struct Type * param = symbol->type->__anon1.__anon2.params.first;
+struct Symbol * sym;
+struct Expression * typeSize;
 
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
-FreeType(param);
+b = b->base;
+sym = FindClass(b->fullName);
+name[0] = '\0';
+DeclareStruct(curExternal, sym->string, 0, 1);
+FullClassNameCat(name, sym->string, 0);
+if(b->structSize == b->offset)
+typeSize = MkExpConstant("0");
+else
+typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
+e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
+e = e->__anon1.op.exp2;
 }
-if(type->classObjectType != 1)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
-symbol->type->__anon1.__anon2.staticMethod = 1;
-symbol->type->__anon1.__anon2.thisClass = (((void *)0));
-symbol->type->extraParam = 0;
 }
 }
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, _class->fullName, 1);
-structName[0] = (char)0;
-FullClassNameCat(structName, _class->fullName, 0);
-funcDecl = GetFuncDecl(function->declarator);
-if(funcDecl)
+else
 {
-if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
+if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
 {
-struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
-
-if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
+FreeSpecifier(exp->__anon1._class);
+exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
+exp->type = 2;
+}
+else
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
-FreeTypeName(param);
+char className[1024];
+
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass(curExternal, classSym, className);
+FreeExpContents(exp);
+exp->type = 9;
+exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
+exp->__anon1.member.member = MkIdentifier("structSize");
 }
 }
-if(!function->propertyNoThis)
-{
-struct TypeName * thisParam = (((void *)0));
+}
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-if(type->classObjectType != 1)
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+});
+break;
+}
+case 10:
 {
-thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
-if(!funcDecl->__anon1.function.parameters)
-funcDecl->__anon1.function.parameters = MkList();
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
+struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
+
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+});
+exp->isConstant = 1;
+DeclareType(curExternal, type, 1, 0);
+FreeType(type);
+break;
 }
-if(typedObject)
+case 11:
 {
-if(type->classObjectType != 1)
+struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
+
+type->count = 1;
+FreeType(exp->__anon1.cast.exp->destType);
+exp->__anon1.cast.exp->destType = type;
+type->refCount++;
+type->casted = 1;
+ProcessExpressionType(exp->__anon1.cast.exp);
+type->casted = 0;
+type->count = 0;
+exp->expType = type;
+if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
 {
-if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
-thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
-}
-thisParam = __extension__ ({
-struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
+void * prev = exp->prev, * next = exp->next;
+struct Type * expType = exp->__anon1.cast.exp->destType;
+struct Expression * castExp = exp->__anon1.cast.exp;
+struct Type * destType = exp->destType;
 
-__ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
-});
-DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
+if(expType)
+expType->refCount++;
+FreeType(exp->expType);
+FreeTypeName(exp->__anon1.cast.typeName);
+*exp = *castExp;
+FreeType(exp->expType);
+FreeType(exp->destType);
+exp->expType = expType;
+exp->destType = destType;
+((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
+exp->prev = prev;
+exp->next = next;
 }
+else
+{
+exp->isConstant = exp->__anon1.cast.exp->isConstant;
 }
+break;
 }
-if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
+case 33:
 {
-struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
+struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
 
-funcDecl = GetFuncDecl(initDecl->declarator);
-if(funcDecl)
+exp->expType = type;
+break;
+}
+case 34:
+{
+struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
+
+ProcessExpressionType(exp->__anon1.vaArg.exp);
+exp->expType = type;
+break;
+}
+case 12:
+{
+struct Expression * e;
+struct Type * t = exp->destType;
+
+if(t && !exp->destType->casted)
+{
+t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+CopyTypeInto(t, exp->destType);
+t->count = 0;
+}
+else if(t)
+t->refCount++;
+exp->isConstant = 1;
+FreeType(exp->__anon1.cond.cond->destType);
+exp->__anon1.cond.cond->destType = MkClassType("bool");
+exp->__anon1.cond.cond->destType->truth = 1;
+ProcessExpressionType(exp->__anon1.cond.cond);
+if(!exp->__anon1.cond.cond->isConstant)
+exp->isConstant = 0;
+for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
 {
-if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
+if(!e->next)
 {
-struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
-
-if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
+FreeType(e->destType);
+e->destType = t;
+if(e->destType)
+e->destType->refCount++;
+}
+ProcessExpressionType(e);
+if(!e->next)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
-FreeTypeName(param);
+exp->expType = e->expType;
+if(e->expType)
+e->expType->refCount++;
 }
+if(!e->isConstant)
+exp->isConstant = 0;
 }
-if(type->classObjectType != 1)
+FreeType(exp->__anon1.cond.elseExp->destType);
+exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
+if(exp->__anon1.cond.elseExp->destType)
+exp->__anon1.cond.elseExp->destType->refCount++;
+ProcessExpressionType(exp->__anon1.cond.elseExp);
+if(!exp->__anon1.cond.elseExp->isConstant)
+exp->isConstant = 0;
+FreeType(t);
+break;
+}
+case 23:
 {
-if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
+if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
 {
-struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
+struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
 
-if(!funcDecl->__anon1.function.parameters)
-funcDecl->__anon1.function.parameters = MkList();
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
-}
-}
+if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
+{
+((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
+if(exp->destType)
+exp->destType->refCount++;
 }
+ProcessStatement(exp->__anon1.compound);
+exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
+if(exp->expType)
+exp->expType->refCount++;
 }
+break;
 }
-if(function->body)
-{
-if(type->classObjectType != 1)
+case 24:
 {
-thisSymbol = __extension__ ({
-struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
+struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
 
-__ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
-});
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-if(typedObject && thisSymbol->type)
+if(spec && spec->type == 1)
 {
-thisSymbol->type->classObjectType = 2;
-thisSymbol->type->byReference = type->byReference;
-thisSymbol->type->typedByReference = type->byReference;
+exp->expType = MkClassType(spec->__anon1.__anon1.name);
+exp->expType->kind = 19;
+exp->byReference = 1;
 }
+else
+{
+exp->expType = MkClassType("ecere::com::Class");
+exp->byReference = 1;
 }
+break;
 }
-if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
+case 25:
 {
-struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
 
+if(_class)
 {
-struct __ecereNameSpace__ecere__com__Class * base;
+struct Identifier * id = exp->__anon1.classData.id;
+char structName[1024];
+struct Expression * classExp;
 
-for(base = _class; base && base->type != 1000; base = base->next)
-{
-for(member = base->membersAndProperties.first; member; member = member->next)
-if(!member->isProperty)
-break;
-if(member)
-break;
-}
+strcpy(structName, "__ecereClassData_");
+FullClassNameCat(structName, _class->fullName, 0);
+exp->type = 9;
+exp->__anon1.member.member = id;
+if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
+classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
+else
+classExp = MkExpIdentifier(MkIdentifier("class"));
+exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpMember(classExp, MkIdentifier("data"))), '+', MkExpMember(MkExpClass(MkListOne(MkSpecifierName(_class->fullName)), (((void *)0))), MkIdentifier("offsetClass"))))))));
+ProcessExpressionType(exp);
+return ;
 }
-for(member = _class->membersAndProperties.first; member; member = member->next)
-if(!member->isProperty)
 break;
-if(member)
+}
+case 35:
 {
-char pointerName[1024];
-struct Declaration * decl;
-struct Initializer * initializer;
-struct Expression * exp, * bytePtr;
+struct Type * type = (((void *)0));
+const char * typeString = (((void *)0));
+char typeStringBuf[1024];
 
-strcpy(pointerName, "__ecerePointer_");
-FullClassNameCat(pointerName, _class->fullName, 0);
+if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(exp->destType->__anon1._class->__anon1.registered, containerClass))
 {
-char className[1024];
+struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
 
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(curExternal, classSym, className);
+typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
 }
-bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
-if(_class->fixed)
+else if(exp->__anon1.list)
 {
 struct Expression * e;
 
-if(_class->offset && _class->offset == _class->base->structSize)
+for(e = (*exp->__anon1.list).first; e; e = e->next)
 {
-e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
 ProcessExpressionType(e);
+if(e->expType)
+{
+if(!type)
+{
+type = e->expType;
+type->refCount++;
 }
 else
 {
-char string[256];
-
-sprintf(string, "%d", _class->offset);
-e = MkExpConstant(string);
+if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+{
+FreeType(type);
+type = e->expType;
+e->expType = (((void *)0));
+e = (*exp->__anon1.list).first;
+ProcessExpressionType(e);
+if(e->expType)
+{
+if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+{
+FreeType(e->expType);
+e->expType = (((void *)0));
+FreeType(type);
+type = (((void *)0));
+break;
 }
-exp = QBrackets(MkExpOp(bytePtr, '+', e));
 }
-else
+}
+}
+if(e->expType)
 {
-exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
+FreeType(e->expType);
+e->expType = (((void *)0));
 }
-exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
-exp->expType = __extension__ ({
-struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
-}), __ecereInstance2;
-});
-if(function->body)
+}
+}
+if(type)
 {
-yylloc = function->body->loc;
-initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
+typeStringBuf[0] = '\0';
+PrintTypeNoConst(type, typeStringBuf, 0, 1);
+typeString = typeStringBuf;
+FreeType(type);
+type = (((void *)0));
+}
+}
+if(typeString)
 {
-struct Context * prevContext = curContext;
-struct __ecereNameSpace__ecere__sys__OldList * list;
+char templateString[1024];
+struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
+struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Expression * expExt;
+struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
 
-curContext = function->body->__anon1.compound.context;
-decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
-curContext = prevContext;
+sprintf(templateString, "Container<%s>", typeString);
+if(exp->__anon1.list)
+{
+struct Expression * e;
+
+type = ProcessTypeString(typeString, 0);
+while((e = (*exp->__anon1.list).first))
+{
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
+e->destType = type;
+type->refCount++;
+ProcessExpressionType(e);
+ListAdd(initializers, MkInitializerAssignment(e));
 }
-decl->symbol = (((void *)0));
-if(!function->body->__anon1.compound.declarations)
-function->body->__anon1.compound.declarations = MkList();
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
+FreeType(type);
+(__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
+}
+DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
+ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
+ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
+ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
+ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
+ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
+ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
+ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
+ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
+ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
+struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
+
+__ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
+})));
+ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
+ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
+ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
+exp->expType = ProcessTypeString(templateString, 0);
+exp->type = 5;
+exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
+ProcessExpressionType(expExt);
 }
+else
+{
+exp->expType = ProcessTypeString("Container", 0);
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
 }
+break;
 }
 }
-else
-thisClass = (((void *)0));
-if(id)
+if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
+{
+FreeType(exp->expType);
+exp->expType = ReplaceThisClassType(thisClass);
+}
+if(exp->expType && (exp->expType->kind == 9 || exp->expType->kind == 10 || exp->expType->kind == 15) && !exp->expType->__anon1.__anon1.members.first && exp->expType->__anon1.__anon1.enumName)
 {
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
-if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
+struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
+
+if(symbol)
 {
-struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
+if(exp->expType->kind != 15)
+{
+struct Type * member;
+char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
 
-id = GetDeclId(initDecl->declarator);
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
-}
+FreeType(exp->expType);
+exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+exp->expType->kind = symbol->type->kind;
+exp->expType->refCount++;
+exp->expType->__anon1.__anon1.enumName = enumName;
+exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
+for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
+member->refCount++;
 }
-if(function->body)
-topContext = function->body->__anon1.compound.context;
+else
 {
-struct FunctionDefinition * oldFunction = curFunction;
+struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
 
-curFunction = function;
-if(function->body)
-ProcessStatement(function->body);
-if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
+for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
 {
-struct Statement * prevCompound = curCompound;
-struct Context * prevContext = curContext;
-struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
+struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__sys__NamedLink64)), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
 
-if(!function->body->__anon1.compound.statements)
-function->body->__anon1.compound.statements = MkList();
-ListAdd(function->body->__anon1.compound.statements, fireWatchers);
-curCompound = function->body;
-curContext = function->body->__anon1.compound.context;
-ProcessStatement(fireWatchers);
-curContext = prevContext;
-curCompound = prevCompound;
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
 }
-curFunction = oldFunction;
 }
-if(function->declarator)
-{
-ProcessDeclarator(function->declarator, 1);
 }
-topContext = oldTopContext;
-thisClass = oldThisClass;
 }
-
-static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
+yylloc = exp->loc;
+if(exp->destType && (exp->destType->kind == 18))
+;
+else if(exp->destType && !exp->destType->keepCast)
 {
-struct ClassDef * def;
-struct External * external = curExternal;
-struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
-
-for(def = definitions->first; def; def = def->next)
+if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
+exp->needTemplateCast = 1;
+if(exp->destType->kind == 0)
+;
+else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
 {
-if(def->type == 0)
+unsigned int invalidCast = 0;
+
+if(inCompiler && exp->destType->count && exp->expType)
 {
-if(def->__anon1.function->declarator)
-curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
-else
-curExternal = external;
-ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
+struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
+
+if(c1 && c1->type != 1)
+c1 = (((void *)0));
+if(c2 && c2->type != 1)
+c2 = (((void *)0));
+if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
+invalidCast = 1;
 }
-else if(def->type == 2)
+if(!exp->destType->count || unresolved || invalidCast)
 {
-if(def->__anon1.decl->type == 2)
+if(!exp->expType)
 {
-thisClass = regClass;
-ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
-thisClass = (((void *)0));
-}
-else
+yylloc = exp->loc;
+if(exp->destType->kind != 14)
 {
-struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
+char type2[1024];
 
-if(regClass)
-thisClass = regClass;
-ProcessDeclaration(def->__anon1.decl);
-thisClass = backThisClass;
+type2[0] = '\0';
+if(inCompiler)
+{
+char expString[10240];
+
+expString[0] = '\0';
+PrintType(exp->destType, type2, 0, 1);
+if(inCompiler)
+{
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
+if(unresolved)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
+else if(exp->type != 16)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
 }
-else if(def->type == 1 && def->__anon1.defProperties)
+}
+else
 {
-struct MemberInit * defProperty;
-struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = regClass ? MkClassType(regClass->fullName) : (((void *)0)), thisSymbol);
+char expString[10240];
 
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
+expString[0] = '\0';
+if(inCompiler)
 {
-thisClass = regClass;
-ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
-thisClass = (((void *)0));
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-FreeSymbol(thisSymbol);
+if(unresolved)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
+else if(exp->type != 16)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
 }
-else if(def->type == 3 && def->__anon1.propertyDef)
+}
+else
 {
-struct PropertyDef * prop = def->__anon1.propertyDef;
+char type1[1024];
+char type2[1024];
 
-thisClass = regClass;
-if(prop->setStmt)
+type1[0] = '\0';
+type2[0] = '\0';
+if(inCompiler)
 {
-if(regClass)
+PrintType(exp->expType, type1, 0, 1);
+PrintType(exp->destType, type2, 0, 1);
+}
+if(exp->destType->truth && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && !strcmp(exp->destType->__anon1._class->__anon1.registered->name, "bool") && exp->expType->kind != 0 && exp->expType->kind != 9 && exp->expType->kind != 10 && (exp->expType->kind != 8 || exp->expType->classObjectType || (exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type != 1)))
+;
+else
 {
-struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
+char expString[10240];
 
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-}
-curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
-ProcessStatement(prop->setStmt);
+expString[0] = '\0';
+if(inCompiler)
+{
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-if(prop->getStmt)
+if(!sourceFile || (!strstr(sourceFile, "src\\lexer.ec") && !strstr(sourceFile, "src/lexer.ec") && !strstr(sourceFile, "src\\grammar.ec") && !strstr(sourceFile, "src/grammar.ec") && !strstr(sourceFile, "src\\type.ec") && !strstr(sourceFile, "src/type.ec") && !strstr(sourceFile, "src\\expression.ec") && !strstr(sourceFile, "src/expression.ec")))
 {
-if(regClass)
+if(invalidCast)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
+else
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
+}
+if(!inCompiler)
 {
-struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
-
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+FreeType(exp->expType);
+exp->destType->refCount++;
+exp->expType = exp->destType;
 }
-curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
-ProcessStatement(prop->getStmt);
 }
-if(prop->issetStmt)
+}
+}
+}
+else if(exp->destType && exp->destType->kind == 13 && exp->destType->__anon1.type && exp->destType->__anon1.type->kind == 11 && exp->expType && (exp->expType->kind == 11 || exp->expType->kind == 16))
 {
-if(regClass)
+struct Expression * nbExp = GetNonBracketsExp(exp);
+
+if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
 {
-struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
+struct Expression * e = MoveExpContents(exp);
 
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
+exp->type = 11;
+exp->__anon1.cast.exp->destType = exp->destType;
+if(exp->destType)
+exp->destType->refCount++;
+exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
 }
-curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
-ProcessStatement(prop->issetStmt);
 }
-thisClass = (((void *)0));
 }
-else if(def->type == 4 && def->__anon1.propertyWatch)
+else if(unresolved)
 {
-struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
-
-thisClass = regClass;
-if(propertyWatch->compound)
+if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s::%s\n", (((void *)0))), exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name, exp->__anon1.__anon1.identifier->string);
+else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
+}
+else if(!exp->expType && exp->type != 16)
 {
-struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = regClass ? MkClassType(regClass->fullName) : (((void *)0)), thisSymbol);
+char expString[10240];
 
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-curExternal = (((void *)0));
-ProcessStatement(propertyWatch->compound);
+expString[0] = '\0';
+if(inCompiler)
+{
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-thisClass = (((void *)0));
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
 }
+if(inCompiler)
+ApplyAnyObjectLogic(exp);
+if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 5 && (!exp->destType || (exp->destType->kind != 3 && exp->destType->kind != 4 && exp->destType->kind != 22 && exp->destType->kind != 23 && exp->destType->kind != 5 && exp->destType->kind != 2 && exp->destType->kind != 1 && exp->destType->kind != 24)))
+{
+exp->byReference = 1;
 }
+yylloc = oldyylloc;
 }
 
-static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
+static void ProcessFunction(struct FunctionDefinition * function)
 {
-switch(spec->type)
+struct Identifier * id = GetDeclId(function->declarator);
+struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
+struct Type * type = symbol ? symbol->type : (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
+struct Context * oldTopContext = topContext;
+
+yylloc = function->loc;
+if(type && type->__anon1.__anon2.thisClass)
+{
+struct Symbol * classSym = type->__anon1.__anon2.thisClass;
+struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
+char className[1024];
+char structName[1024];
+struct Declarator * funcDecl;
+struct Symbol * thisSymbol;
+unsigned int typedObject = 0;
+
+if(_class && !_class->base)
 {
-case 0:
+_class = currentClass;
+if(_class && !_class->symbol)
+_class->symbol = FindClass(_class->fullName);
+classSym = _class ? _class->symbol : (((void *)0));
+typedObject = 1;
+}
+thisClass = _class;
+if(inCompiler && _class)
 {
-if(spec->__anon1.specifier == THISCLASS)
+if(type->kind == 11)
 {
-if(thisClass)
+if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
 {
-spec->type = 1;
-spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
-spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
-ProcessSpecifier(spec, declareStruct);
+struct Type * param = symbol->type->__anon1.__anon2.params.first;
+
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
+FreeType(param);
 }
+if(type->classObjectType != 1)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
+symbol->type->__anon1.__anon2.staticMethod = 1;
+symbol->type->__anon1.__anon2.thisClass = (((void *)0));
+symbol->type->extraParam = 0;
 }
-break;
 }
-case 1:
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, _class->fullName, 1);
+structName[0] = (char)0;
+FullClassNameCat(structName, _class->fullName, 0);
+funcDecl = GetFuncDecl(function->declarator);
+if(funcDecl)
 {
-struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
-
-if(symbol)
-DeclareType(curExternal, symbol->type, 1, 1);
-else if(spec->__anon1.__anon1.symbol)
+if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
 {
-struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
+struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
 
-DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
+if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
+FreeTypeName(param);
 }
-break;
 }
-case 2:
+if(!function->propertyNoThis)
 {
-struct Enumerator * e;
+struct TypeName * thisParam = (((void *)0));
 
-if(spec->__anon1.__anon2.list)
-{
-for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
+if(type->classObjectType != 1)
 {
-if(e->exp)
-ProcessExpressionType(e->exp);
-}
-}
-if(inCompiler)
-break;
+thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
+if(!funcDecl->__anon1.function.parameters)
+funcDecl->__anon1.function.parameters = MkList();
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
 }
-case 3:
-case 4:
+if(typedObject)
 {
-if(spec->__anon1.__anon2.definitions)
+if(type->classObjectType != 1)
 {
-struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
-
-ProcessClass(spec->__anon1.__anon2.definitions, symbol);
+if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
+thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
 }
-break;
+thisParam = __extension__ ({
+struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
+
+__ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
+});
+DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
 }
 }
 }
-
-void ComputeDataTypes()
+if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
 {
-struct External * external;
+struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
 
-currentClass = (((void *)0));
-containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
-DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
-DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
-DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
-DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
-DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
-DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
-DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
-DeclareFunctionUtil((((void *)0)), "eSystem_New");
-DeclareFunctionUtil((((void *)0)), "eSystem_New0");
-DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
-DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
-DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
-DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
-DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
-DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
-DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
-DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
-DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
-DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
-DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
-for(external = (*ast).first; external; external = external->next)
+funcDecl = GetFuncDecl(initDecl->declarator);
+if(funcDecl)
 {
-afterExternal = curExternal = external;
-if(external->type == 0)
+if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
 {
-if(memoryGuard)
+struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
+
+if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
 {
-DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
-DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
+FreeTypeName(param);
 }
-currentClass = external->__anon1.function->_class;
-ProcessFunction(external->__anon1.function);
 }
-else if(external->type == 1)
-{
-if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
+if(type->classObjectType != 1)
 {
-DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
-DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
-}
-currentClass = (((void *)0));
-if(external->__anon1.declaration)
-ProcessDeclaration(external->__anon1.declaration);
-}
-else if(external->type == 2)
+if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
 {
-struct ClassDefinition * _class = external->__anon1._class;
+struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
 
-currentClass = external->symbol->__anon1.registered;
-if(memoryGuard)
-{
-DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
-DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
-}
-if(_class->definitions)
-{
-ProcessClass(_class->definitions, _class->symbol);
-}
-if(inCompiler)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
-((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
+if(!funcDecl->__anon1.function.parameters)
+funcDecl->__anon1.function.parameters = MkList();
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
 }
 }
-else if(external->type == 4)
-{
-thisNameSpace = external->__anon1.id->string;
 }
 }
-currentClass = (((void *)0));
-thisNameSpace = (((void *)0));
-curExternal = (((void *)0));
 }
-
-static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
-{
-switch(decl->type)
-{
-case 1:
-if(decl->__anon1.identifier->classSym)
+if(function->body)
 {
-FreeSpecifier(decl->__anon1.identifier->_class);
-decl->__anon1.identifier->_class = (((void *)0));
-}
-break;
-case 3:
-if(decl->__anon1.array.exp)
-ProcessExpressionType(decl->__anon1.array.exp);
-case 0:
-case 2:
-case 4:
-case 5:
-case 6:
-case 7:
+if(type->classObjectType != 1)
 {
-struct Identifier * id = (((void *)0));
-struct Specifier * classSpec = (((void *)0));
+thisSymbol = __extension__ ({
+struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
 
-if(decl->type == 4)
-{
-id = GetDeclId(decl);
-if(id && id->_class)
+__ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
+});
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+if(typedObject && thisSymbol->type)
 {
-classSpec = id->_class;
-id->_class = (((void *)0));
+thisSymbol->type->classObjectType = 2;
+thisSymbol->type->byReference = type->byReference;
+thisSymbol->type->typedByReference = type->byReference;
 }
 }
-if(decl->declarator)
-ProcessDeclarator(decl->declarator, isFunction);
-if(decl->type == 4)
-{
-if(classSpec)
-{
-struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
-
-if(!decl->__anon1.function.parameters)
-decl->__anon1.function.parameters = MkList();
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
 }
-if(decl->__anon1.function.parameters)
+if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
 {
-struct TypeName * param;
+struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
 
-for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
 {
-if(param->qualifiers)
-{
-struct Specifier * spec;
+struct __ecereNameSpace__ecere__com__Class * base;
 
-for(spec = (*param->qualifiers).first; spec; spec = spec->next)
-{
-if(spec->type == 0)
-{
-if(spec->__anon1.specifier == TYPED_OBJECT)
+for(base = _class; base && base->type != 1000; base = base->next)
 {
-struct Declarator * d = param->declarator;
-struct TypeName * newParam = (newParam = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), newParam->qualifiers = MkListOne(MkSpecifier(VOID)), newParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d), newParam);
-
-if(d->type != 5)
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
-FreeList(param->qualifiers, (void *)(FreeSpecifier));
-param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
-param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
-DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
-param = newParam;
+for(member = base->membersAndProperties.first; member; member = member->next)
+if(!member->isProperty)
+break;
+if(member)
 break;
 }
-else if(spec->__anon1.specifier == ANY_OBJECT)
+}
+for(member = _class->membersAndProperties.first; member; member = member->next)
+if(!member->isProperty)
+break;
+if(member)
+{
+char pointerName[1024];
+struct Declaration * decl;
+struct Initializer * initializer;
+struct Expression * exp, * bytePtr;
+
+strcpy(pointerName, "__ecerePointer_");
+FullClassNameCat(pointerName, _class->fullName, 0);
 {
-struct Declarator * d = param->declarator;
+char className[1024];
 
-FreeList(param->qualifiers, (void *)(FreeSpecifier));
-param->qualifiers = MkListOne(MkSpecifier(VOID));
-if(d->type != 5)
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
-param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
-break;
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass(curExternal, classSym, className);
 }
-else if(spec->__anon1.specifier == THISCLASS)
+bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
+if(_class->fixed)
 {
-if(thisClass)
+struct Expression * e;
+
+if(_class->offset && _class->offset == _class->base->structSize)
 {
-spec->type = 1;
-spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
-spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
-ProcessSpecifier(spec, 0);
-}
-break;
-}
+e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
+ProcessExpressionType(e);
 }
-else if(spec->type == 1)
+else
 {
-ProcessSpecifier(spec, isFunction);
-}
+char string[256];
+
+sprintf(string, "%d", _class->offset);
+e = MkExpConstant(string);
 }
+exp = QBrackets(MkExpOp(bytePtr, '+', e));
 }
-if(param->declarator)
-ProcessDeclarator(param->declarator, 0);
+else
+{
+exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
 }
+exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
+}), __ecereInstance2;
+});
+if(function->body)
+{
+yylloc = function->body->loc;
+initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
+{
+struct Context * prevContext = curContext;
+struct __ecereNameSpace__ecere__sys__OldList * list;
+
+curContext = function->body->__anon1.compound.context;
+decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
+curContext = prevContext;
 }
+decl->symbol = (((void *)0));
+if(!function->body->__anon1.compound.declarations)
+function->body->__anon1.compound.declarations = MkList();
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
 }
-break;
 }
 }
 }
-
-static void ProcessDeclaration(struct Declaration * decl)
+else
+thisClass = (((void *)0));
+if(id)
 {
-yylloc = decl->loc;
-switch(decl->type)
+FreeSpecifier(id->_class);
+id->_class = (((void *)0));
+if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
 {
-case 1:
+struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
+
+id = GetDeclId(initDecl->declarator);
+FreeSpecifier(id->_class);
+id->_class = (((void *)0));
+}
+}
+if(function->body)
+topContext = function->body->__anon1.compound.context;
 {
-unsigned int declareStruct = 0;
+struct FunctionDefinition * oldFunction = curFunction;
 
-if(decl->__anon1.__anon1.declarators)
+curFunction = function;
+if(function->body)
+ProcessStatement(function->body);
+if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
 {
-struct InitDeclarator * d;
+struct Statement * prevCompound = curCompound;
+struct Context * prevContext = curContext;
+struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
 
-for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+if(!function->body->__anon1.compound.statements)
+function->body->__anon1.compound.statements = MkList();
+ListAdd(function->body->__anon1.compound.statements, fireWatchers);
+curCompound = function->body;
+curContext = function->body->__anon1.compound.context;
+ProcessStatement(fireWatchers);
+curContext = prevContext;
+curCompound = prevCompound;
+}
+curFunction = oldFunction;
+}
+if(function->declarator)
 {
-struct Type * type, * subType;
+ProcessDeclarator(function->declarator, 1);
+}
+topContext = oldTopContext;
+thisClass = oldThisClass;
+}
 
-ProcessDeclarator(d->declarator, 0);
-type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
-if(d->initializer)
+static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
 {
-ProcessInitializer(d->initializer, type);
-if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
+struct ClassDef * def;
+struct External * external = curExternal;
+struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
+
+for(def = definitions->first; def; def = def->next)
 {
-if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
+if(def->type == 0)
 {
-struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
-
-inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
-d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
-if(decl->__anon1.__anon1.specifiers)
-FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
-FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
-d = (((void *)0));
-decl->type = 2;
-decl->__anon1.inst = inst;
-}
-}
+if(def->__anon1.function->declarator)
+curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
+else
+curExternal = external;
+ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
 }
-for(subType = type; subType; )
+else if(def->type == 2)
 {
-if(subType->kind == 8)
+if(def->__anon1.decl->type == 2)
 {
-declareStruct = 1;
-break;
+thisClass = regClass;
+ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
+thisClass = (((void *)0));
 }
-else if(subType->kind == 13)
-break;
-else if(subType->kind == 12)
-subType = subType->__anon1.__anon4.arrayType;
 else
-break;
-}
-FreeType(type);
-if(!d)
-break;
+{
+struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
+
+if(regClass)
+thisClass = regClass;
+ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
+thisClass = backThisClass;
 }
 }
-if(decl->__anon1.__anon1.specifiers)
+else if(def->type == 1 && def->__anon1.defProperties)
 {
-struct Specifier * s;
+struct MemberInit * defProperty;
+struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = regClass ? MkClassType(regClass->fullName) : (((void *)0)), thisSymbol);
 
-for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
 {
-ProcessSpecifier(s, declareStruct);
-}
-}
-break;
+thisClass = regClass;
+ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
+thisClass = (((void *)0));
 }
-case 2:
-{
-ProcessInstantiationType(decl->__anon1.inst);
-break;
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+FreeSymbol(thisSymbol);
 }
-case 0:
+else if(def->type == 3 && def->__anon1.propertyDef)
 {
-struct Specifier * spec;
-struct Declarator * d;
-unsigned int declareStruct = 0;
+struct PropertyDef * prop = def->__anon1.propertyDef;
 
-if(decl->__anon1.__anon1.declarators)
+thisClass = regClass;
+if(prop->setStmt)
 {
-for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+if(regClass)
 {
-struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
-struct Type * subType;
+struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
 
-ProcessDeclarator(d, 0);
-for(subType = type; subType; )
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+}
+curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
+ProcessStatement(prop->setStmt);
+}
+if(prop->getStmt)
 {
-if(subType->kind == 8)
+if(regClass)
 {
-declareStruct = 1;
-break;
+struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
+
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
 }
-else if(subType->kind == 13)
-break;
-else if(subType->kind == 12)
-subType = subType->__anon1.__anon4.arrayType;
-else
-break;
+curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
+ProcessStatement(prop->getStmt);
 }
-FreeType(type);
+if(prop->issetStmt)
+{
+if(regClass)
+{
+struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
+
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
 }
+curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
+ProcessStatement(prop->issetStmt);
 }
-if(decl->__anon1.__anon1.specifiers)
+thisClass = (((void *)0));
+}
+else if(def->type == 4 && def->__anon1.propertyWatch)
 {
-for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
-ProcessSpecifier(spec, declareStruct);
+struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
+
+thisClass = regClass;
+if(propertyWatch->compound)
+{
+struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = regClass ? MkClassType(regClass->fullName) : (((void *)0)), thisSymbol);
+
+__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
+curExternal = (((void *)0));
+ProcessStatement(propertyWatch->compound);
 }
-break;
+thisClass = (((void *)0));
 }
 }
 }