compiler/libec: Fixed reference issue with conversion properties
[sdk] / compiler / bootstrap / libec / bootstrap / pass15.c
index d06a4b1..940b311 100644 (file)
@@ -35,6 +35,18 @@ typedef unsigned __int64 uint64;
 #else
 #define __ENDIAN_PAD(x) 0
 #endif
+#if defined(_WIN32)
+#   if defined(__GNUC__) || defined(__TINYC__)
+#      define ecere_stdcall __attribute__((__stdcall__))
+#      define ecere_gcc_struct __attribute__((gcc_struct))
+#   else
+#      define ecere_stdcall __stdcall
+#      define ecere_gcc_struct
+#   endif
+#else
+#   define ecere_stdcall
+#   define ecere_gcc_struct
+#endif
 #include <stdint.h>
 #include <sys/types.h>
 enum yytokentype
@@ -170,6 +182,8 @@ extern const char *  sourceFile;
 
 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
 
+unsigned int reachedPass15;
+
 extern unsigned int memoryGuard;
 
 struct __ecereNameSpace__ecere__sys__OldList
@@ -179,7 +193,7 @@ void *  last;
 int count;
 unsigned int offset;
 unsigned int circ;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__DataValue
 {
@@ -196,8 +210,8 @@ float f;
 double d;
 long long i64;
 uint64 ui64;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__SerialBuffer
 {
@@ -205,7 +219,7 @@ unsigned char *  _buffer;
 unsigned int count;
 unsigned int _size;
 unsigned int pos;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
 
@@ -237,7 +251,7 @@ int line;
 int charPos;
 int pos;
 int included;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern size_t strlen(const char * );
 
@@ -262,7 +276,7 @@ struct __ecereNameSpace__ecere__com__LinkList
 void * first;
 void * last;
 int count;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern char *  strchr(const char * , int);
 
@@ -348,7 +362,7 @@ struct __ecereNameSpace__ecere__com__EnumClassData
 {
 struct __ecereNameSpace__ecere__sys__OldList values;
 long long largest;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct __ecereNameSpace__ecere__sys__OldList *  CopyList(struct __ecereNameSpace__ecere__sys__OldList *  source, void *  (*  CopyFunction)(void * ));
 
@@ -370,7 +384,7 @@ struct Location
 {
 struct CodePosition start;
 struct CodePosition end;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 void ReadString(char * output, char * string)
 {
@@ -524,7 +538,7 @@ char * PrintUShort(unsigned short result)
 {
 char temp[100];
 
-if(result > (unsigned short)32767)
+if(result > 32767)
 sprintf(temp, "0x%X", (int)result);
 else
 sprintf(temp, "%d", (int)result);
@@ -543,9 +557,9 @@ char * PrintChar(char result)
 {
 char temp[100];
 
-if(result > (char)0 && isprint(result))
+if(result > 0 && isprint(result))
 sprintf(temp, "'%c'", result);
-else if(result < (char)0)
+else if(result < 0)
 sprintf(temp, "%d", (int)result);
 else
 sprintf(temp, "0x%X", (unsigned char)result);
@@ -608,8 +622,8 @@ union
 {
 char * s;
 struct Attrib * attr;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
 
@@ -631,12 +645,12 @@ extern void FreeExpression(struct Expression * exp);
 
 extern void FreeExpContents(struct Expression * exp);
 
+extern struct Expression * GetNonBracketsExp(struct Expression * exp);
+
 extern struct Expression * CopyExpression(struct Expression * exp);
 
 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
 
-extern struct Expression * GetNonBracketsExp(struct Expression * exp);
-
 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
 
 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
@@ -688,7 +702,7 @@ struct __ecereNameSpace__ecere__com__Instance
 void * *  _vTbl;
 struct __ecereNameSpace__ecere__com__Class * _class;
 int _refCount;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
 
@@ -759,15 +773,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes;
 struct __ecereNameSpace__ecere__sys__OldList functions;
 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);
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__NameSpace;
 
@@ -786,7 +792,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent;
 struct __ecereNameSpace__ecere__sys__BTNode * left;
 struct __ecereNameSpace__ecere__sys__BTNode * right;
 int depth;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
 
@@ -816,7 +822,7 @@ const char *  category;
 unsigned int compiled;
 unsigned int selfWatchable;
 unsigned int isWatchable;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
 
@@ -847,7 +853,13 @@ struct __ecereNameSpace__ecere__sys__OldLink
 struct __ecereNameSpace__ecere__sys__OldLink * prev;
 struct __ecereNameSpace__ecere__sys__OldLink * next;
 void *  data;
-} __attribute__ ((gcc_struct));
+} ecere_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;
 
@@ -878,51 +890,51 @@ struct
 {
 struct Identifier * id;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) labeled;
+} ecere_gcc_struct labeled;
 struct
 {
 struct Expression * exp;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) caseStmt;
+} ecere_gcc_struct caseStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * declarations;
 struct __ecereNameSpace__ecere__sys__OldList * statements;
 struct Context * context;
 unsigned int isSwitch;
-} __attribute__ ((gcc_struct)) compound;
+} ecere_gcc_struct compound;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
 struct Statement * elseStmt;
-} __attribute__ ((gcc_struct)) ifStmt;
+} ecere_gcc_struct ifStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) switchStmt;
+} ecere_gcc_struct switchStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) whileStmt;
+} ecere_gcc_struct whileStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) doWhile;
+} ecere_gcc_struct doWhile;
 struct
 {
 struct Statement * init;
 struct Statement * check;
 struct __ecereNameSpace__ecere__sys__OldList * increment;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) forStmt;
+} ecere_gcc_struct forStmt;
 struct
 {
 struct Identifier * id;
-} __attribute__ ((gcc_struct)) gotoStmt;
+} ecere_gcc_struct gotoStmt;
 struct
 {
 struct Specifier * spec;
@@ -930,23 +942,23 @@ char * statements;
 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
-} __attribute__ ((gcc_struct)) asmStmt;
+} ecere_gcc_struct asmStmt;
 struct
 {
 struct Expression * watcher;
 struct Expression * object;
 struct __ecereNameSpace__ecere__sys__OldList * watches;
-} __attribute__ ((gcc_struct)) _watch;
+} ecere_gcc_struct _watch;
 struct
 {
 struct Identifier * id;
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct __ecereNameSpace__ecere__sys__OldList * filter;
 struct Statement * stmt;
-} __attribute__ ((gcc_struct)) forEachStmt;
+} ecere_gcc_struct forEachStmt;
 struct Declaration * decl;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 extern struct Specifier * CopySpecifier(struct Specifier * spec);
 
@@ -963,7 +975,7 @@ struct Symbol * classSym;
 struct Specifier * _class;
 char *  string;
 struct Identifier * badID;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct Symbol * FindStruct(struct Context * ctx, const char *  name);
 
@@ -989,7 +1001,7 @@ struct TemplateDatatype
 {
 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
 struct Declarator * decl;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct Declarator * SpecDeclFromString(const char *  string, struct __ecereNameSpace__ecere__sys__OldList *  specs, struct Declarator * baseDecl);
 
@@ -1017,26 +1029,26 @@ struct
 struct Expression * exp;
 struct Expression * posExp;
 struct Attrib * attrib;
-} __attribute__ ((gcc_struct)) structDecl;
+} ecere_gcc_struct structDecl;
 struct
 {
 struct Expression * exp;
 struct Specifier * enumClass;
-} __attribute__ ((gcc_struct)) array;
+} ecere_gcc_struct array;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * parameters;
-} __attribute__ ((gcc_struct)) function;
+} ecere_gcc_struct function;
 struct
 {
 struct Pointer * pointer;
-} __attribute__ ((gcc_struct)) pointer;
+} ecere_gcc_struct pointer;
 struct
 {
 struct ExtDecl * extended;
-} __attribute__ ((gcc_struct)) extended;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct extended;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 extern struct Identifier * GetDeclId(struct Declarator * decl);
 
@@ -1070,7 +1082,7 @@ struct Type * type;
 struct Symbol * propSet;
 int tempCount;
 unsigned int propertyNoThis;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct Declarator * QMkPtrDecl(const char *  id);
 
@@ -1096,7 +1108,7 @@ unsigned int isDestructor;
 unsigned int dontMangle;
 int id;
 int idCode;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic);
 
@@ -1121,7 +1133,7 @@ struct __ecereNameSpace__ecere__sys__OldList *  qualifiers;
 struct Declarator * declarator;
 int classObjectType;
 struct Expression * bitCount;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern void FreeTypeName(struct TypeName * typeName);
 
@@ -1143,7 +1155,7 @@ struct __ecereNameSpace__ecere__com__BTNamedLink * left;
 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
 int depth;
 void *  data;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__sys__NamedLink64;
 
@@ -1153,7 +1165,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
 char *  name;
 long long data;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Instantiation;
 
@@ -1169,18 +1181,18 @@ struct
 {
 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
 struct __ecereNameSpace__ecere__sys__OldList *  declarators;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct Instantiation * inst;
 struct
 {
 struct Identifier * id;
 struct Expression * exp;
-} __attribute__ ((gcc_struct)) __anon2;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon2;
+} ecere_gcc_struct __anon1;
 struct Specifier * extStorage;
 struct Symbol * symbol;
 int declMode;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Instantiation
 {
@@ -1197,7 +1209,7 @@ unsigned char *  data;
 struct Location nameLoc;
 struct Location insideLoc;
 unsigned int built;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern void FreeInstance(struct Instantiation * inst);
 
@@ -1219,7 +1231,7 @@ struct Location loc;
 struct Statement * compound;
 struct __ecereNameSpace__ecere__sys__OldList *  properties;
 unsigned int deleteWatch;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern void FreePropertyWatch(struct PropertyWatch * watcher);
 
@@ -1233,7 +1245,7 @@ char *  name;
 unsigned int isVirtual;
 unsigned int hasSet;
 unsigned int hasGet;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct MethodImport;
 
@@ -1243,7 +1255,7 @@ struct MethodImport * prev;
 struct MethodImport * next;
 char *  name;
 unsigned int isVirtual;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct FunctionImport;
 
@@ -1252,7 +1264,7 @@ struct FunctionImport
 struct FunctionImport * prev;
 struct FunctionImport * next;
 char *  name;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct ClassImport;
 
@@ -1265,7 +1277,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods;
 struct __ecereNameSpace__ecere__sys__OldList properties;
 unsigned int itself;
 int isRemote;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Initializer;
 
@@ -1281,7 +1293,7 @@ struct
 {
 char *  constant;
 struct Identifier * identifier;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct Statement * compound;
 struct Instantiation * instance;
 struct
@@ -1289,86 +1301,86 @@ struct
 char *  string;
 unsigned int intlString;
 unsigned int wideString;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
 struct __ecereNameSpace__ecere__sys__OldList *  list;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
 struct Declarator * decl;
-} __attribute__ ((gcc_struct)) _classExp;
+} ecere_gcc_struct _classExp;
 struct
 {
 struct Identifier * id;
-} __attribute__ ((gcc_struct)) classData;
+} ecere_gcc_struct classData;
 struct
 {
 struct Expression * exp;
 struct __ecereNameSpace__ecere__sys__OldList * arguments;
 struct Location argLoc;
-} __attribute__ ((gcc_struct)) call;
+} ecere_gcc_struct call;
 struct
 {
 struct Expression * exp;
 struct __ecereNameSpace__ecere__sys__OldList * index;
-} __attribute__ ((gcc_struct)) index;
+} ecere_gcc_struct index;
 struct
 {
 struct Expression * exp;
 struct Identifier * member;
 int memberType;
 unsigned int thisPtr;
-} __attribute__ ((gcc_struct)) member;
+} ecere_gcc_struct member;
 struct
 {
 int op;
 struct Expression * exp1;
 struct Expression * exp2;
-} __attribute__ ((gcc_struct)) op;
+} ecere_gcc_struct op;
 struct TypeName * typeName;
 struct Specifier * _class;
 struct
 {
 struct TypeName * typeName;
 struct Expression * exp;
-} __attribute__ ((gcc_struct)) cast;
+} ecere_gcc_struct cast;
 struct
 {
 struct Expression * cond;
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Expression * elseExp;
-} __attribute__ ((gcc_struct)) cond;
+} ecere_gcc_struct cond;
 struct
 {
 struct TypeName * typeName;
 struct Expression * size;
-} __attribute__ ((gcc_struct)) _new;
+} ecere_gcc_struct _new;
 struct
 {
 struct TypeName * typeName;
 struct Expression * size;
 struct Expression * exp;
-} __attribute__ ((gcc_struct)) _renew;
+} ecere_gcc_struct _renew;
 struct
 {
 char * table;
 struct Identifier * id;
-} __attribute__ ((gcc_struct)) db;
+} ecere_gcc_struct db;
 struct
 {
 struct Expression * ds;
 struct Expression * name;
-} __attribute__ ((gcc_struct)) dbopen;
+} ecere_gcc_struct dbopen;
 struct
 {
 struct TypeName * typeName;
 struct Initializer * initializer;
-} __attribute__ ((gcc_struct)) initializer;
+} ecere_gcc_struct initializer;
 struct
 {
 struct Expression * exp;
 struct TypeName * typeName;
-} __attribute__ ((gcc_struct)) vaArg;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct vaArg;
+} ecere_gcc_struct __anon1;
 unsigned int debugValue;
 struct __ecereNameSpace__ecere__com__DataValue val;
 uint64 address;
@@ -1384,7 +1396,7 @@ unsigned int needCast;
 unsigned int thisPtr;
 unsigned int opDestType;
 unsigned int needTemplateCast;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
 
@@ -1398,10 +1410,10 @@ union
 {
 struct Expression * exp;
 struct __ecereNameSpace__ecere__sys__OldList *  list;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 unsigned int isConstant;
 struct Identifier * id;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
 
@@ -1416,7 +1428,7 @@ struct InitDeclarator * next;
 struct Location loc;
 struct Declarator * declarator;
 struct Initializer * initializer;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 void ApplyLocation(struct Expression * exp, struct Location * loc)
 {
@@ -1505,8 +1517,8 @@ union
 {
 struct __ecereNameSpace__ecere__sys__OldList *  dataMembers;
 struct ClassFunction * function;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
 
@@ -1549,7 +1561,7 @@ unsigned int (*  Sma)(struct Expression *, struct Operand *, struct Operand *);
 unsigned int (*  GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
 unsigned int (*  SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
 unsigned int (*  Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Operand
 {
@@ -1568,9 +1580,9 @@ float f;
 double d;
 long long i64;
 uint64 ui64;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct OpTable ops;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct External *  _DeclareStruct(struct External *  neededBy, const char *  name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
 
@@ -1620,7 +1632,7 @@ void *  symbol;
 const char *  dataTypeString;
 struct Type * dataType;
 int memberAccess;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Symbol
 {
@@ -1635,7 +1647,7 @@ union
 struct __ecereNameSpace__ecere__com__Method * method;
 struct __ecereNameSpace__ecere__com__Property * _property;
 struct __ecereNameSpace__ecere__com__Class * registered;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 unsigned int notYetDeclared;
 union
 {
@@ -1643,20 +1655,20 @@ struct
 {
 struct External * pointerExternal;
 struct External * structExternal;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct
 {
 struct External * externalGet;
 struct External * externalSet;
 struct External * externalPtr;
 struct External * externalIsSet;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
 struct
 {
 struct External * methodExternal;
 struct External * methodCodeExternal;
-} __attribute__ ((gcc_struct)) __anon3;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon3;
+} ecere_gcc_struct __anon2;
 unsigned int imported;
 unsigned int declaredStructSym;
 struct __ecereNameSpace__ecere__com__Class * _class;
@@ -1683,7 +1695,8 @@ struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
 struct Context * ctx;
 int isIterator;
 struct Expression * propCategory;
-} __attribute__ ((gcc_struct));
+unsigned int mustRegister;
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__ClassProperty;
 
@@ -1701,7 +1714,7 @@ long long (*  Get)(struct __ecereNameSpace__ecere__com__Class *);
 const char *  dataTypeString;
 struct Type * dataType;
 unsigned int constant;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__BitMember;
 
@@ -1721,7 +1734,7 @@ int type;
 int size;
 int pos;
 uint64 mask;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__DataMember;
 
@@ -1733,7 +1746,7 @@ struct
 {
 const char *  dataTypeString;
 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct __ecereNameSpace__ecere__com__DataValue expression;
 struct
 {
@@ -1743,10 +1756,10 @@ union
 struct __ecereNameSpace__ecere__com__DataMember * member;
 struct __ecereNameSpace__ecere__com__Property * prop;
 struct __ecereNameSpace__ecere__com__Method * method;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct)) __anon2;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct __anon2;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class **  curClass, struct __ecereNameSpace__ecere__com__DataMember **  curMember, struct __ecereNameSpace__ecere__com__DataMember **  subMemberStack, int *  subMemberStackPos);
 
@@ -1765,11 +1778,11 @@ union
 {
 struct TemplateDatatype * dataType;
 int memberType;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct TemplateArgument * defaultArgument;
 const char *  dataTypeString;
 struct Type * baseType;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Type
 {
@@ -1783,7 +1796,7 @@ struct
 {
 struct __ecereNameSpace__ecere__sys__OldList members;
 char *  enumName;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct
 {
 struct Type * returnType;
@@ -1791,13 +1804,13 @@ struct __ecereNameSpace__ecere__sys__OldList params;
 struct Symbol * thisClass;
 unsigned int staticMethod;
 struct TemplateParameter * thisClassTemplate;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
 struct
 {
 struct __ecereNameSpace__ecere__com__Method * method;
 struct __ecereNameSpace__ecere__com__Class * methodClass;
 struct __ecereNameSpace__ecere__com__Class * usedClass;
-} __attribute__ ((gcc_struct)) __anon3;
+} ecere_gcc_struct __anon3;
 struct
 {
 struct Type * arrayType;
@@ -1805,19 +1818,22 @@ int arraySize;
 struct Expression * arraySizeExp;
 unsigned int freeExp;
 struct Symbol * enumClass;
-} __attribute__ ((gcc_struct)) __anon4;
+} ecere_gcc_struct __anon4;
 struct Type * type;
 struct TemplateParameter * templateParameter;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 int kind;
 unsigned int size;
 char *  name;
 char *  typeName;
+struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
 int classObjectType;
 int alignment;
 unsigned int offset;
 int bitFieldCount;
 int count;
+int bitMemberSize;
 unsigned int isSigned : 1;
 unsigned int constant : 1;
 unsigned int truth : 1;
@@ -1833,7 +1849,9 @@ unsigned int declaredWithStruct : 1;
 unsigned int typedByReference : 1;
 unsigned int casted : 1;
 unsigned int pointerAlignment : 1;
-} __attribute__ ((gcc_struct));
+unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
+} ecere_gcc_struct;
 
 struct Specifier
 {
@@ -1850,7 +1868,8 @@ struct ExtDecl * extDecl;
 char *  name;
 struct Symbol * symbol;
 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
-} __attribute__ ((gcc_struct)) __anon1;
+struct Specifier * nsSpec;
+} ecere_gcc_struct __anon1;
 struct
 {
 struct Identifier * id;
@@ -1860,12 +1879,12 @@ struct __ecereNameSpace__ecere__sys__OldList *  definitions;
 unsigned int addNameSpace;
 struct Context * ctx;
 struct ExtDecl * extDeclStruct;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
 struct Expression * expression;
 struct Specifier * _class;
 struct TemplateParameter * templateParameter;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
 
@@ -1877,7 +1896,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * left;
 struct __ecereNameSpace__ecere__sys__BTNode * right;
 int depth;
 struct TemplateParameter * param;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
 {
@@ -1903,7 +1922,7 @@ if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
 {
 return 0;
 }
-if(type1->kind == type2->kind)
+if(type1->kind == type2->kind && type1->isLong == type2->isLong)
 {
 switch(type1->kind)
 {
@@ -2511,7 +2530,7 @@ static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2526,7 +2545,7 @@ static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2541,7 +2560,7 @@ static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2556,7 +2575,7 @@ static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2661,7 +2680,7 @@ static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2676,7 +2695,7 @@ static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2691,7 +2710,7 @@ static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2706,7 +2725,7 @@ static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2811,7 +2830,7 @@ static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2826,7 +2845,7 @@ static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2841,7 +2860,7 @@ static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2856,7 +2875,7 @@ static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2901,7 +2920,7 @@ static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->__anon1.i;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2916,7 +2935,7 @@ static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->__anon1.ui;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2931,7 +2950,7 @@ static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->__anon1.i64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2946,7 +2965,7 @@ static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->__anon1.ui64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2961,7 +2980,7 @@ static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2976,7 +2995,7 @@ static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -2991,7 +3010,7 @@ static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3006,7 +3025,7 @@ static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3021,7 +3040,7 @@ static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->__anon1.f;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
+exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3036,7 +3055,7 @@ static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->__anon1.d;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
+exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3051,7 +3070,7 @@ static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->__anon1.i;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3066,7 +3085,7 @@ static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->__anon1.ui;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3081,7 +3100,7 @@ static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->__anon1.i64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3096,7 +3115,7 @@ static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->__anon1.ui64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3111,7 +3130,7 @@ static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3126,7 +3145,7 @@ static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3141,7 +3160,7 @@ static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -3156,7 +3175,7 @@ static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4161,7 +4180,7 @@ static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->__anon1.i;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4176,7 +4195,7 @@ static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->__anon1.ui;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4191,7 +4210,7 @@ static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->__anon1.i64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4206,7 +4225,7 @@ static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->__anon1.ui64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4221,7 +4240,7 @@ static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4236,7 +4255,7 @@ static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4251,7 +4270,7 @@ static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4266,7 +4285,7 @@ static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc /= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4281,7 +4300,7 @@ static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1,
 float value2 = op2->__anon1.f;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
+exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4296,7 +4315,7 @@ static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1
 double value2 = op2->__anon1.d;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
+exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4311,7 +4330,7 @@ static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->__anon1.i;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4326,7 +4345,7 @@ static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->__anon1.ui;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4341,7 +4360,7 @@ static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->__anon1.i64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4356,7 +4375,7 @@ static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->__anon1.ui64;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4371,7 +4390,7 @@ static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4386,7 +4405,7 @@ static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4401,7 +4420,7 @@ static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4416,7 +4435,7 @@ static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc %= value2)) : 0);
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4491,7 +4510,7 @@ static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4506,7 +4525,7 @@ static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4521,7 +4540,7 @@ static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4536,7 +4555,7 @@ static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4611,7 +4630,7 @@ static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, st
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4626,7 +4645,7 @@ static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, s
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4641,7 +4660,7 @@ static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, str
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4656,7 +4675,7 @@ static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, st
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4731,7 +4750,7 @@ static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4746,7 +4765,7 @@ static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4761,7 +4780,7 @@ static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4776,7 +4795,7 @@ static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4851,7 +4870,7 @@ static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4866,7 +4885,7 @@ static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4881,7 +4900,7 @@ static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4896,7 +4915,7 @@ static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4971,7 +4990,7 @@ static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->__anon1.s;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -4986,7 +5005,7 @@ static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->__anon1.us;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5001,7 +5020,7 @@ static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->__anon1.c;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5016,7 +5035,7 @@ static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->__anon1.uc;
 
 exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7339,7 +7358,7 @@ char *  dataTypeString;
 struct Type * dataType;
 void *  symbol;
 char *  fullName;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, unsigned int *  offset, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember **  subMemberStack, int *  subMemberStackPos);
 
@@ -7360,7 +7379,7 @@ struct __ecereNameSpace__ecere__com__DefinedExpression * next;
 const char *  name;
 const char *  value;
 struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__sys__BinaryTree;
 
@@ -7370,7 +7389,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root;
 int count;
 int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
 void (*  FreeKey)(void *  key);
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__Class
 {
@@ -7429,7 +7448,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized;
 int numParams;
 unsigned int isInstanceClass;
 unsigned int byValueSystemClass;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__NameSpace
 {
@@ -7443,7 +7462,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__DataMember
 {
@@ -7465,7 +7484,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
 int memberOffset;
 short structAlignment;
 short pointerAlignment;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char *  key);
 
@@ -7594,7 +7613,12 @@ op.ops = ucharOps;
 break;
 }
 case 2:
-if(type->isSigned)
+if(exp->__anon1.__anon1.constant[0] == '\'')
+{
+op.__anon1.s = exp->__anon1.__anon1.constant[1];
+op.ops = shortOps;
+}
+else if(type->isSigned)
 {
 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
 op.ops = shortOps;
@@ -7607,14 +7631,19 @@ op.ops = ushortOps;
 break;
 case 3:
 case 5:
-if(type->isSigned)
+if(exp->__anon1.__anon1.constant[0] == '\'')
+{
+op.__anon1.i = exp->__anon1.__anon1.constant[1];
+op.ops = intOps;
+}
+else if(type->isSigned)
 {
 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
 op.ops = intOps;
 }
 else
 {
-op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
+op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
 op.ops = uintOps;
 }
 op.kind = 3;
@@ -7954,7 +7983,7 @@ unsigned int isGUIApp;
 struct __ecereNameSpace__ecere__sys__OldList allModules;
 char *  parsedCommand;
 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 static void FindNextDataMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
 {
@@ -8327,7 +8356,7 @@ int importType;
 int origImportType;
 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 static struct GlobalData * FindGlobalData(char * name)
 {
@@ -8385,7 +8414,7 @@ struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere_
 if(symbol)
 return symbol;
 memcpy(nameSpace, name, c + 1);
-nameSpace[c + 1] = (char)0;
+nameSpace[c + 1] = 0;
 return ScanWithNameSpace(tree, nameSpace, namePart);
 }
 else if(gotColon)
@@ -8502,7 +8531,7 @@ struct Conversion * prev, * next;
 struct __ecereNameSpace__ecere__com__Property * convert;
 unsigned int isGet;
 struct Type * resultType;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 static void FreeConvert(struct Conversion * convert)
 {
@@ -8519,7 +8548,7 @@ struct Enumerator * next;
 struct Location loc;
 struct Identifier * id;
 struct Expression * exp;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct AsmField;
 
@@ -8531,7 +8560,7 @@ struct Location loc;
 char *  command;
 struct Expression * expression;
 struct Identifier * symbolic;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct ClassDefinition;
 
@@ -8548,7 +8577,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
 struct ClassDefinition * classDef;
 unsigned int templateTypesOnly;
 unsigned int hasNameSpace;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct External
 {
@@ -8565,13 +8594,13 @@ struct Declaration * declaration;
 char *  importString;
 struct Identifier * id;
 struct DBTableDef * table;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 int importType;
 struct External * fwdDecl;
 struct __ecereNameSpace__ecere__com__Instance * outgoing;
 struct __ecereNameSpace__ecere__com__Instance * incoming;
 int nonBreakableIncoming;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct ClassDefinition
 {
@@ -8586,7 +8615,7 @@ struct Location blockStart;
 struct Location nameLoc;
 int declMode;
 unsigned int deleteWatchable;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
 
@@ -8684,11 +8713,11 @@ struct
 {
 struct Identifier * id;
 struct Initializer * initializer;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct __anon1;
 int memberAccess;
 void *  object;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct PropertyDef
 {
@@ -8708,8 +8737,8 @@ struct
 unsigned int conversion : 1;
 unsigned int isWatchable : 1;
 unsigned int isDBProp : 1;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
 {
@@ -8807,7 +8836,7 @@ struct TemplateDatatype * templateDatatype;
 struct DBTableEntry * dbtableEntry;
 struct DBIndexItem * dbindexItem;
 struct DBTableDef * dbtableDef;
-} __attribute__ ((gcc_struct)) YYSTYPE;
+} ecere_gcc_struct YYSTYPE;
 
 extern YYSTYPE yylval;
 
@@ -8822,7 +8851,7 @@ struct Initializer * initializer;
 unsigned int used;
 unsigned int variable;
 unsigned int takeOutExp;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
 
@@ -8838,10 +8867,10 @@ union
 {
 const char *  dataTypeString;
 int memberType;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
 void *  param;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
 {
@@ -9638,7 +9667,7 @@ struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
 const char *  dataTypeString;
 struct Type * dataType;
 void *  symbol;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char *  name);
 
@@ -9751,7 +9780,7 @@ if(function)
 {
 char name[1024];
 
-name[0] = (char)0;
+name[0] = 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, s, 0);
@@ -9811,7 +9840,7 @@ struct __ecereNameSpace__ecere__com__SubModule * prev;
 struct __ecereNameSpace__ecere__com__SubModule * next;
 struct __ecereNameSpace__ecere__com__Instance * module;
 int importMode;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
 {
@@ -10189,14 +10218,6 @@ FreeType(exp->expType);
 break;
 }
 }
-if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
-{
-exp->type = 4;
-exp->__anon1.op.op = '*';
-exp->__anon1.op.exp1 = (((void *)0));
-exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
-}
-else
 {
 char typeString[1024];
 struct Declarator * decl;
@@ -10209,6 +10230,8 @@ exp->type = 11;
 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
 exp->__anon1.cast.exp->needCast = 1;
+exp->needTemplateCast = 2;
+newExp->needTemplateCast = 2;
 }
 break;
 }
@@ -10432,10 +10455,10 @@ if(member)
 {
 member->memberOffset = 0;
 if(targetBits < sizeof(void *) * 8)
-member->structAlignment = (short)0;
+member->structAlignment = 0;
 }
 else if(targetBits < sizeof(void *) * 8)
-_class->structAlignment = (short)0;
+_class->structAlignment = 0;
 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
 if(!member && _class->destructionWatchOffset)
@@ -11220,7 +11243,7 @@ if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((
 {
 char type[1024];
 
-type[0] = (char)0;
+type[0] = 0;
 PrintType(paramDest, type, 0, 1);
 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
 if(paramDestType != paramDest)
@@ -12443,7 +12466,7 @@ classSym->declaring--;
 }
 return external;
 }
-structName[0] = (char)0;
+structName[0] = 0;
 FullClassNameCat(structName, name, 0);
 classSym->declaredStructSym = 1;
 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
@@ -12479,10 +12502,6 @@ if(curSpec)
 curSpec->__anon1.__anon2.definitions = declarations;
 else
 {
-char className[1024];
-
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
 specifiers = MkList();
 declarators = MkList();
 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
@@ -12518,6 +12537,18 @@ classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((v
 external->symbol = classSym;
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
 }
+if(reachedPass15 && !external->__anon1.declaration && classSym->__anon1.registered && classSym->__anon1.registered->type == 5)
+{
+char structName[1024];
+struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
+
+structName[0] = 0;
+FullClassNameCat(structName, name, 0);
+specifiers = MkList();
+declarators = MkList();
+ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))));
+external->__anon1.declaration = MkDeclaration(specifiers, declarators);
+}
 if(fwdDecl)
 {
 struct External * e = external->fwdDecl ? external->fwdDecl : external;
@@ -13528,7 +13559,7 @@ case 24:
 case 1:
 if(type->isSigned)
 {
-char value = (char)0;
+char value = 0;
 
 if(GetChar(e, &value))
 {
@@ -13539,7 +13570,7 @@ exp->type = 2;
 }
 else
 {
-unsigned char value = (unsigned char)0;
+unsigned char value = 0;
 
 if(GetUChar(e, &value))
 {
@@ -13552,7 +13583,7 @@ break;
 case 2:
 if(type->isSigned)
 {
-short value = (short)0;
+short value = 0;
 
 if(GetShort(e, &value))
 {
@@ -13563,7 +13594,7 @@ exp->type = 2;
 }
 else
 {
-unsigned short value = (unsigned short)0;
+unsigned short value = 0;
 
 if(GetUShort(e, &value))
 {
@@ -13784,21 +13815,22 @@ unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * de
 struct Type * source;
 struct Type * realDest = dest;
 struct Type * backupSourceExpType = (((void *)0));
-struct Expression * computedExp = sourceExp;
+struct Expression * nbExp = GetNonBracketsExp(sourceExp);
+struct Expression * computedExp = nbExp;
 
 dest->refCount++;
 if(sourceExp->isConstant && sourceExp->type != 2 && sourceExp->type != 0 && sourceExp->type != 11 && dest->kind == 8 && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
 {
-computedExp = CopyExpression(sourceExp);
+computedExp = CopyExpression(nbExp);
 ComputeExpression(computedExp);
 }
 source = sourceExp->expType;
 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
 {
-if(computedExp != sourceExp)
+if(computedExp != nbExp)
 {
 FreeExpression(computedExp);
-computedExp = sourceExp;
+computedExp = nbExp;
 }
 FreeType(dest);
 return 1;
@@ -13815,10 +13847,10 @@ for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->b
 ;
 if(sourceBase == destBase)
 {
-if(computedExp != sourceExp)
+if(computedExp != nbExp)
 {
 FreeExpression(computedExp);
-computedExp = sourceExp;
+computedExp = nbExp;
 }
 FreeType(dest);
 return 1;
@@ -13846,12 +13878,12 @@ value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void
 else
 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
 }
-if(computedExp != sourceExp)
+if(computedExp != nbExp)
 {
 FreeExpression(computedExp);
-computedExp = sourceExp;
+computedExp = nbExp;
 }
-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__ ({
@@ -14105,18 +14137,28 @@ ListAdd(specs, MkSpecifier(BOOL));
 }
 else if(dest->kind == 1 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (dest->isSigned ? (value >= -128 && value <= 127) : (value >= 0 && value <= 255)))
 {
+if(source->kind == 3)
+return 1;
+else
+{
 specs = MkList();
 if(!dest->isSigned)
 ListAdd(specs, MkSpecifier(UNSIGNED));
 ListAdd(specs, MkSpecifier(CHAR));
 }
+}
 else if(dest->kind == 2 && (source->kind == 15 || source->kind == 24 || source->kind == 1 || source->kind == 2 || (source->kind == 3 && (dest->isSigned ? (value >= -32768 && value <= 32767) : (value >= 0 && value <= 65535)))))
 {
+if(source->kind == 3)
+return 1;
+else
+{
 specs = MkList();
 if(!dest->isSigned)
 ListAdd(specs, MkSpecifier(UNSIGNED));
 ListAdd(specs, MkSpecifier(SHORT));
 }
+}
 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
 {
 specs = MkList();
@@ -14186,10 +14228,10 @@ return 1;
 }
 else
 {
-if(computedExp != sourceExp)
+if(computedExp != nbExp)
 {
 FreeExpression(computedExp);
-computedExp = sourceExp;
+computedExp = nbExp;
 }
 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
 sourceExp = (*sourceExp->__anon1.list).last;
@@ -14500,3029 +14542,2838 @@ 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);
-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(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;
-
-if(!stmt->__anon1.compound.isSwitch)
-curCompound = stmt;
-curContext = stmt->__anon1.compound.context;
-if(stmt->__anon1.compound.declarations)
+if(spec->__anon1.specifier == THISCLASS)
 {
-for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
-ProcessDeclaration(decl);
-}
-if(stmt->__anon1.compound.statements)
+if(thisClass)
 {
-for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
-ProcessStatement(s);
+spec->type = 1;
+spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
+spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
+ProcessSpecifier(spec, declareStruct, 0);
 }
-curContext = prevContext;
-curCompound = prevCompound;
 }
 break;
 }
-case 3:
+case 1:
 {
-struct Expression * exp;
+struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
 
-if(stmt->__anon1.expressions)
+if(symbol)
+DeclareType(curExternal, symbol->type, 1, 1);
+else if(spec->__anon1.__anon1.symbol)
 {
-for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
-ProcessExpressionType(exp);
+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);
 }
 break;
 }
-case 4:
+case 2:
 {
-struct Expression * exp;
+struct Enumerator * e;
 
-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)
+if(spec->__anon1.__anon2.list)
 {
-ProcessExpressionType(exp);
+for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
+{
+if(e->exp)
+ProcessExpressionType(e->exp);
 }
-if(stmt->__anon1.ifStmt.stmt)
-ProcessStatement(stmt->__anon1.ifStmt.stmt);
-if(stmt->__anon1.ifStmt.elseStmt)
-ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
+}
+if(inCompiler)
 break;
 }
-case 5:
+case 3:
+case 4:
 {
-struct Type * oldSwitchType = curSwitchType;
-
-if(stmt->__anon1.switchStmt.exp)
+if(spec->__anon1.__anon2.definitions)
 {
-struct Expression * exp;
+struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
 
-for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
-{
-if(!exp->next)
-{
-ProcessExpressionType(exp);
+ProcessClass(spec->__anon1.__anon2.definitions, symbol);
 }
-if(!exp->next)
-curSwitchType = exp->expType;
+break;
 }
 }
-ProcessStatement(stmt->__anon1.switchStmt.stmt);
-curSwitchType = oldSwitchType;
-break;
 }
-case 6:
+
+static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
 {
-if(stmt->__anon1.whileStmt.exp)
+switch(decl->type)
 {
-struct Expression * exp;
-
-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)
+case 1:
+if(decl->__anon1.identifier->classSym)
 {
-ProcessExpressionType(exp);
-}
+FreeSpecifier(decl->__anon1.identifier->_class);
+decl->__anon1.identifier->_class = (((void *)0));
 }
-if(stmt->__anon1.whileStmt.stmt)
-ProcessStatement(stmt->__anon1.whileStmt.stmt);
 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.doWhile.exp)
-{
-struct Expression * exp;
+struct Identifier * id = (((void *)0));
+struct Specifier * classSpec = (((void *)0));
 
-if((*stmt->__anon1.doWhile.exp).last)
+if(decl->type == 4)
 {
-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)
+id = GetDeclId(decl);
+if(id && id->_class)
 {
-ProcessExpressionType(exp);
-}
+classSpec = id->_class;
+id->_class = (((void *)0));
 }
-if(stmt->__anon1.doWhile.stmt)
-ProcessStatement(stmt->__anon1.doWhile.stmt);
-break;
 }
-case 8:
-{
-struct Expression * exp;
-
-if(stmt->__anon1.forStmt.init)
-ProcessStatement(stmt->__anon1.forStmt.init);
-if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
+if(decl->declarator)
+ProcessDeclarator(decl->declarator, isFunction);
+if(decl->type == 4)
 {
-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.forStmt.check)
-ProcessStatement(stmt->__anon1.forStmt.check);
-if(stmt->__anon1.forStmt.increment)
+if(classSpec)
 {
-for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
-ProcessExpressionType(exp);
-}
-if(stmt->__anon1.forStmt.stmt)
-ProcessStatement(stmt->__anon1.forStmt.stmt);
-break;
+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 18:
+if(decl->__anon1.function.parameters)
 {
-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;
+struct TypeName * param;
 
-for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
+for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
 {
-if(!e->next)
+if(param->qualifiers)
 {
-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)))
-{
-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");
+struct Specifier * spec;
 
-if(inCompiler)
+for(spec = (*param->qualifiers).first; spec; spec = spec->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))
+if(spec->type == 0)
 {
-struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
+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);
 
-isCustomAVLTree = 1;
-if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
-isMap = 1;
+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;
 }
-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))
+else if(spec->__anon1.specifier == ANY_OBJECT)
 {
-struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
+struct Declarator * d = param->declarator;
 
-isLinkList = 1;
-isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
+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(inCompiler && isArray)
+else if(spec->__anon1.specifier == THISCLASS)
 {
-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(thisClass)
+{
+spec->type = 1;
+spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
+spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
+ProcessSpecifier(spec, 0, 0);
 }
-else if(isBuiltin)
+break;
+}
+}
+else if(spec->type == 1)
 {
-struct Type * type = (((void *)0));
-char typeStringBuf[1024];
+ProcessSpecifier(spec, isFunction, 1);
+}
+}
+}
+if(param->declarator)
+ProcessDeclarator(param->declarator, 0);
+}
+}
+}
+break;
+}
+}
+}
 
-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)
+static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
 {
-struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
+yylloc = decl->loc;
+switch(decl->type)
+{
+case 1:
+{
+unsigned int declareStruct = 0;
 
-if(typeName)
-arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
-}
-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)
+if(decl->__anon1.__anon1.declarators)
 {
-struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
+struct InitDeclarator * d;
 
-typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
-}
-else if(arrayExp->__anon1.list)
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
 {
-struct Expression * e;
+struct Type * type, * subType;
 
-for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
+ProcessDeclarator(d->declarator, 0);
+type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
+if(d->initializer)
 {
-ProcessExpressionType(e);
-if(e->expType)
+ProcessInitializer(d->initializer, type);
+if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
 {
-if(!type)
+if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
 {
-type = e->expType;
-type->refCount++;
+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;
 }
-else
-{
-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)
+}
+}
+for(subType = type; subType; )
 {
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+if(subType->kind == 8)
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
-FreeType(type);
-type = (((void *)0));
+declareStruct = 1;
 break;
 }
+else if(subType->kind == 13)
+break;
+else if(subType->kind == 12)
+subType = subType->__anon1.__anon4.arrayType;
+else
+break;
 }
+FreeType(type);
+if(!d)
+break;
 }
 }
-if(e->expType)
+if(decl->__anon1.__anon1.specifiers)
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
+struct Specifier * s;
+
+for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
+{
+ProcessSpecifier(s, declareStruct, 1);
 }
 }
+break;
 }
-if(type)
+case 2:
 {
-typeStringBuf[0] = '\0';
-PrintType(type, typeStringBuf, 0, 1);
-typeString = typeStringBuf;
-FreeType(type);
-}
+ProcessInstantiationType(decl->__anon1.inst);
+break;
 }
-if(typeString)
-{
-if(inCompiler)
+case 0:
 {
-struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
-struct Declarator * decl;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Specifier * spec;
+struct Declarator * d;
+unsigned int declareStruct = 0;
 
-if(arrayExp->__anon1.list)
+if(decl->__anon1.__anon1.declarators)
 {
-struct Expression * e;
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+{
+struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
+struct Type * subType;
 
-builtinCount = (*arrayExp->__anon1.list).count;
-type = ProcessTypeString(typeString, 0);
-while((e = (*arrayExp->__anon1.list).first))
+ProcessDeclarator(d, 0);
+for(subType = type; subType; )
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
-e->destType = type;
-type->refCount++;
-ProcessExpressionType(e);
-if(inCompiler)
-ListAdd(initializers, MkInitializerAssignment(e));
+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);
-(__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 if(arrayExp->__anon1.list)
-{
-struct Expression * e;
-
-type = ProcessTypeString(typeString, 0);
-for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
+if(decl->__anon1.__anon1.specifiers)
 {
-e->destType = type;
-type->refCount++;
-ProcessExpressionType(e);
-}
-FreeType(type);
+for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
+ProcessSpecifier(spec, declareStruct, warnClasses);
 }
+break;
 }
-else
-{
-arrayExp->expType = ProcessTypeString("Container", 0);
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
 }
 }
-else if(inCompiler && isLinkList && !isList)
-{
-struct Declarator * decl;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
 
-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)
+static void ProcessStatement(struct Statement * stmt)
 {
-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)
-{
-symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
-if(block)
-{
-switch(block->type)
+yylloc = stmt->loc;
+switch(stmt->type)
 {
-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;
+case 0:
+ProcessStatement(stmt->__anon1.labeled.stmt);
 break;
-}
-}
-if(filter)
-{
-block = MkIfStmt(filter, block, (((void *)0)));
-}
-if(isArray)
+case 1:
+if(stmt->__anon1.caseStmt.exp)
 {
-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);
+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);
 }
-else if(isBuiltin)
+if(stmt->__anon1.caseStmt.stmt)
+ProcessStatement(stmt->__anon1.caseStmt.stmt);
+break;
+case 2:
 {
-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)
+if(stmt->__anon1.compound.context)
 {
-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");
+struct Declaration * decl;
+struct Statement * s;
+struct Statement * prevCompound = curCompound;
+struct Context * prevContext = curContext;
 
-if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
+if(!stmt->__anon1.compound.isSwitch)
+curCompound = stmt;
+curContext = stmt->__anon1.compound.context;
+if(stmt->__anon1.compound.declarations)
 {
-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));
+for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
+ProcessDeclaration(decl, 1);
 }
-else
+if(stmt->__anon1.compound.statements)
 {
-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));
+for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
+ProcessStatement(s);
 }
-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);
+curContext = prevContext;
+curCompound = prevCompound;
 }
-else
-{
-stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
+break;
 }
-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);
+case 3:
+{
+struct Expression * exp;
+
+if(stmt->__anon1.expressions)
+{
+for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
+ProcessExpressionType(exp);
 }
-else
-ProcessStatement(stmt->__anon1.forEachStmt.stmt);
-if(inCompiler)
-curContext = stmt->__anon1.compound.context->parent;
 break;
 }
-else
+case 4:
 {
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\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;
 }
-case 9:
-break;
-case 10:
-break;
-case 11:
-break;
-case 12:
+case 5:
 {
-struct Expression * exp;
+struct Type * oldSwitchType = curSwitchType;
 
-if(stmt->__anon1.expressions)
+if(stmt->__anon1.switchStmt.exp)
 {
-for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
+struct Expression * exp;
+
+for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
 {
 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);
 }
+if(!exp->next)
+curSwitchType = exp->expType;
+}
 }
+ProcessStatement(stmt->__anon1.switchStmt.stmt);
+curSwitchType = oldSwitchType;
 break;
 }
-case 14:
+case 6:
+{
+if(stmt->__anon1.whileStmt.exp)
+{
+struct Expression * exp;
+
+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)
 {
-ProcessDeclaration(stmt->__anon1.decl);
+ProcessExpressionType(exp);
+}
+}
+if(stmt->__anon1.whileStmt.stmt)
+ProcessStatement(stmt->__anon1.whileStmt.stmt);
 break;
 }
-case 13:
+case 7:
 {
-struct AsmField * field;
+if(stmt->__anon1.doWhile.exp)
+{
+struct Expression * exp;
 
-if(stmt->__anon1.asmStmt.inputFields)
+if((*stmt->__anon1.doWhile.exp).last)
 {
-for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
-if(field->expression)
-ProcessExpressionType(field->expression);
+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;
 }
-if(stmt->__anon1.asmStmt.outputFields)
+for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
 {
-for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
-if(field->expression)
-ProcessExpressionType(field->expression);
+ProcessExpressionType(exp);
 }
-if(stmt->__anon1.asmStmt.clobberedFields)
+}
+if(stmt->__anon1.doWhile.stmt)
+ProcessStatement(stmt->__anon1.doWhile.stmt);
+break;
+}
+case 8:
 {
-for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
+struct Expression * exp;
+
+if(stmt->__anon1.forStmt.init)
+ProcessStatement(stmt->__anon1.forStmt.init);
+if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
 {
-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.forStmt.check)
+ProcessStatement(stmt->__anon1.forStmt.check);
+if(stmt->__anon1.forStmt.increment)
+{
+for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
+ProcessExpressionType(exp);
 }
+if(stmt->__anon1.forStmt.stmt)
+ProcessStatement(stmt->__anon1.forStmt.stmt);
 break;
 }
-case 17:
+case 18:
 {
-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 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;
 
-if(watcher)
-ProcessExpressionType(watcher);
-if(object)
-ProcessExpressionType(object);
-if(inCompiler)
+for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
 {
-if(watcher || thisClass)
+if(!e->next)
 {
-struct External * external = curExternal;
-struct Context * context = curContext;
-
-stmt->type = 3;
-stmt->__anon1.expressions = MkList();
-for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
+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)))
 {
-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 * _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");
 
-sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
-if(propWatch->deleteWatch)
-strcat(watcherName, "_delete");
-else
+if(inCompiler)
 {
-struct Identifier * propID;
+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 __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
 
-for(propID = (*propWatch->properties).first; propID; propID = propID->next)
+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))
 {
-strcat(watcherName, "_");
-strcat(watcherName, propID->string);
+struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
+
+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:
+else if(inCompiler && isLinkList && !isList)
 {
-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;
+struct Declarator * decl;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
 
-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)
+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)
 {
-struct Identifier * propID;
-
-stmt->type = 3;
-stmt->__anon1.expressions = MkList();
-if(!watches)
-{
-struct __ecereNameSpace__ecere__sys__OldList * args;
-
-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(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));
-
-if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
-{
-char name[1024];
+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;
 
-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(watcher)
+ProcessExpressionType(watcher);
+if(object)
+ProcessExpressionType(object);
+if(inCompiler)
 {
-int c;
-
-for(c = 0; c < definedExpStackPos; c++)
-if(definedExpStack[c] == definedExp)
-break;
-if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
+if(watcher || thisClass)
 {
-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;
+struct External * external = curExternal;
+struct Context * context = curContext;
 
-__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)
+stmt->type = 3;
+stmt->__anon1.expressions = MkList();
+for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
 {
-FreeIdentifier(id);
-exp->type = 5;
-exp->__anon1.list = MkListOne(parsedExpression);
-ApplyLocation(parsedExpression, &yylloc);
-ProcessExpressionType(exp);
-definedExpStackPos--;
-return ;
-}
-definedExpStackPos--;
-}
+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;
+
+sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
+if(propWatch->deleteWatch)
+strcat(watcherName, "_delete");
 else
 {
-if(inCompiler)
+struct Identifier * propID;
+
+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);
+FreeClassFunction(func);
+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"));
+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;
 }
-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:
+case 16:
 {
-exp->isConstant = 1;
-exp->expType = __extension__ ({
-struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+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;
 
-__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+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;
 
-__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;
+stmt->type = 3;
+stmt->__anon1.expressions = MkList();
+if(!watches)
+{
+struct __ecereNameSpace__ecere__sys__OldList * args;
+
+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));
 }
-case 13:
-case 26:
-ProcessExpressionType(exp->__anon1._new.size);
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+else
+{
+for(propID = (*watches).first; propID; propID = propID->next)
+{
+char propName[1024];
+struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
 
-__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);
+if(prop)
+{
+char getName[1024], setName[1024];
+struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
 
-__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);
+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))));
+}
 break;
-case 4:
+}
+}
+}
+
+void ComputeDataTypes()
 {
-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 External * external;
 
-switch(exp->__anon1.op.op)
+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");
+reachedPass15 = 1;
+for(external = (*ast).first; external; external = external->next)
 {
-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)
+afterExternal = curExternal = external;
+if(external->type == 0)
 {
-useSideType = 1;
-useDestType = 1;
+if(memoryGuard)
+{
+DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
+DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
 }
-break;
+currentClass = external->__anon1.function->_class;
+ProcessFunction(external->__anon1.function);
 }
-if(exp->__anon1.op.op == '&')
-{
-if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
+else if(external->type == 1)
 {
-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(symbol && symbol->isIterator == 2)
+if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 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;
-}
+DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
+DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
 }
+currentClass = (((void *)0));
+if(external->__anon1.declaration)
+ProcessDeclaration(external->__anon1.declaration, 1);
 }
-if(exp->__anon1.op.exp1)
+else if(external->type == 2)
 {
-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))
+struct ClassDefinition * _class = external->__anon1._class;
+
+currentClass = external->symbol->__anon1.registered;
+if(memoryGuard)
 {
-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++;
+DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
+DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
 }
-else if(!assign)
+if(_class->definitions)
 {
-if(exp->__anon1.op.exp1->destType)
-FreeType(exp->__anon1.op.exp1->destType);
-exp->__anon1.op.exp1->destType = dummy;
-dummy->refCount++;
+ProcessClass(_class->definitions, _class->symbol);
 }
-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(inCompiler)
 {
-exp->__anon1.op.exp2 = MkExpConstant("1");
-exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
-assign = 1;
+__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(exp->__anon1.op.exp1->destType == dummy)
+}
+else if(external->type == 4)
 {
-FreeType(dummy);
-exp->__anon1.op.exp1->destType = (((void *)0));
+thisNameSpace = external->__anon1.id->string;
 }
-type1 = exp->__anon1.op.exp1->expType;
 }
-if(exp->__anon1.op.exp2)
+currentClass = (((void *)0));
+thisNameSpace = (((void *)0));
+curExternal = (((void *)0));
+}
+
+void ProcessExpressionType(struct Expression * exp)
 {
-char expString[10240];
+unsigned int unresolved = 0;
+struct Location oldyylloc = yylloc;
+unsigned int notByReference = 0;
 
-expString[0] = '\0';
-if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
+if(!exp || exp->expType)
+return ;
+yylloc = exp->loc;
+switch(exp->type)
 {
-if(exp->__anon1.op.exp1)
+case 0:
 {
-exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
-if(exp->__anon1.op.exp1->expType)
-exp->__anon1.op.exp1->expType->refCount++;
-}
-else
+struct Identifier * id = exp->__anon1.__anon1.identifier;
+
+if(!id || !topContext)
+return ;
+if(id->_class && id->_class->__anon1.__anon1.name)
 {
-exp->__anon1.op.exp2->destType = exp->destType;
-if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
-exp->__anon1.op.exp2->opDestType = 1;
-if(exp->destType)
-exp->destType->refCount++;
+id->classSym = id->_class->__anon1.__anon1.symbol;
 }
-if(type1)
-type1->refCount++;
-exp->expType = type1;
+if(!strcmp(id->string, "__runtimePlatform"))
+{
+exp->expType = ProcessTypeString("ecere::com::Platform", 1);
+break;
 }
-else if(assign)
+else if(strstr(id->string, "__ecereClass") == id->string)
 {
-if(inCompiler)
-PrintExpression(exp->__anon1.op.exp2, expString);
-if(type1 && type1->kind == 13)
+exp->expType = ProcessTypeString("ecere::com::Class", 1);
+break;
+}
+else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
 {
-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 == '=')
+ReplaceClassMembers(exp, thisClass);
+if(exp->type != 0)
 {
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-if(type1)
-type1->refCount++;
+ProcessExpressionType(exp);
+break;
 }
+if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
+break;
 }
 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)
-;
+struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
+
+if(!symbol)
+{
+if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
+break;
 else
 {
-if(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = type1;
-if(type1)
-type1->refCount++;
+if(thisClass)
+{
+ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
+if(exp->type != 0)
+{
+ProcessExpressionType(exp);
+break;
 }
 }
-if(type1)
-type1->refCount++;
-exp->expType = type1;
+else if(currentClass && !id->_class)
+{
+if(ResolveIdWithClass(exp, currentClass, 1))
+break;
 }
-else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
+symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
+}
+}
+if(symbol)
 {
-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.exp2->opDestType = 1;
-if(exp->destType)
-exp->destType->refCount++;
+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(_class && !strcmp(id->string, "this") && !type->classObjectType)
+{
+struct Context * context = SetupTemplatesContext(_class);
+
+type = ReplaceThisClassType(_class);
+FinishTemplatesContext(context);
+if(type)
+type->refCount = 0;
+}
+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(_class && _class->type == 1 && !type->declaredWithStruct)
+exp->byReference = 1;
+}
+if(symbol->isIterator)
+{
+if(symbol->isIterator == 3)
+{
+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)
+{
+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(exp->__anon1.op.exp2->destType)
-FreeType(exp->__anon1.op.exp2->destType);
-exp->__anon1.op.exp2->destType = dummy;
-dummy->refCount++;
+struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
+
+if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
+{
+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)
+{
+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 ;
 }
-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++;
+definedExpStackPos--;
 }
-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)
+else
 {
-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;
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
 }
 }
-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)
+else
 {
-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)))
+struct GlobalData * data = (((void *)0));
+
+if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
 {
-if(exp->__anon1.op.op == ADD_ASSIGN)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
+char name[1024];
+
+strcpy(name, thisNameSpace);
+strcat(name, "::");
+strcat(name, id->string);
+data = FindGlobalData(name);
 }
-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(!data)
+data = FindGlobalData(id->string);
+if(data)
 {
-if(exp->__anon1.op.op == ADD_ASSIGN)
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
+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(inCompiler)
+else
 {
-char type1String[1024];
-char type2String[1024];
+struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
 
-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)
+if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
 {
-type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-type2->refCount = 1;
-CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
-type2->isSigned = 1;
+char name[1024];
+
+strcpy(name, thisNameSpace);
+strcat(name, "::");
+strcat(name, id->string);
+function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
 }
-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(!function)
+function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
+if(function)
 {
-type2 = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+char name[1024];
 
-__ecereInstance1->kind = 3, __ecereInstance1;
-});
-type2->refCount = 1;
-type2->isSigned = 1;
-}
-else
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
+name[0] = 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))
 {
-type2 = exp->__anon1.op.exp2->expType;
-if(type2)
-type2->refCount++;
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(name);
 }
+exp->expType = function->dataType;
+if(function->dataType)
+function->dataType->refCount++;
+FreeSpecifier(id->_class);
+id->_class = (((void *)0));
+break;
 }
-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;
 }
-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;
 }
-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;
 }
+unresolved = 1;
+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")))))
+case 1:
 {
-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.instance->_class)
 {
-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)))
+if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
 {
-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++;
+exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
 }
-else
+}
+ProcessInstantiationType(exp->__anon1.instance);
+exp->isConstant = exp->__anon1.instance->isConstant;
+if(exp->__anon1.instance->_class)
 {
-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++;
+exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
 }
-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)
+break;
+}
+case 2:
 {
-struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
-
-if(argExp)
+if(!exp->expType)
 {
-struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
+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->__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)
+exp->expType = type;
+if(constant[0] == '\'')
 {
-ProcessExpressionType(classExp);
-exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
-if(!exp->__anon1.op.exp2->expType)
+if((int)((unsigned char *)constant)[1] > 127)
 {
-if(type2)
-FreeType(type2);
-type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
-type2->refCount++;
-}
-ProcessExpressionType(exp->__anon1.op.exp2);
+int nb;
+unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
+
+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
+{
+type->kind = 1;
+type->isSigned = 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(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++;
+char * dot = strchr(constant, '.');
+unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
+char * exponent;
+
+if(isHex)
+{
+exponent = strchr(constant, 'p');
+if(!exponent)
+exponent = strchr(constant, 'P');
 }
-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)))
+else
 {
-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++;
+exponent = strchr(constant, 'e');
+if(!exponent)
+exponent = strchr(constant, 'E');
 }
-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(dot || exponent)
 {
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
+if(strchr(constant, 'f') || strchr(constant, 'F'))
+type->kind = 6;
+else
+type->kind = 7;
+type->isSigned = 1;
 }
 else
 {
-unsigned int success = 0;
+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"));
 
-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(isSigned)
 {
-if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
+if(i64 < (((int)0x80000000)))
+is64Bit = 1;
+}
+else
 {
-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)
+if(ui64 > (((int)0x7fffffff)))
 {
-struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
-
-if(argExp)
+if(ui64 > (0xffffffff))
 {
-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 ;
+is64Bit = 1;
+if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
+isSigned = 1;
 }
 }
+else if(constant[0] != '0' || !constant[1])
+isSigned = 1;
 }
+if(forceUnsigned)
+isSigned = 0;
+type->kind = is64Bit ? 4 : 3;
+type->isSigned = isSigned;
 }
 }
-if(!success && exp->__anon1.op.exp1->type == 2)
-{
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
-{
-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;
+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 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
-{
-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;
+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;
 }
-else if(!success)
+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:
 {
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
+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);
+
+switch(exp->__anon1.op.op)
 {
-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))
+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:
+break;
+case '|':
+case '^':
+useSideType = 1;
+useDestType = 1;
+break;
+case '/':
+case '%':
+useSideType = 1;
+useDestType = 1;
+break;
+case '&':
+case '*':
+if(exp->__anon1.op.exp1)
 {
-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;
+useSideType = 1;
+useDestType = 1;
 }
+break;
 }
-if(!success)
+if(exp->__anon1.op.op == '&')
 {
-char expString1[10240];
-char expString2[10240];
-char type1[1024];
-char type2[1024];
+if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
+{
+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)));
 
-expString1[0] = '\0';
-expString2[0] = '\0';
-type1[0] = '\0';
-type2[0] = '\0';
-if(inCompiler)
+if(symbol && symbol->isIterator == 2)
 {
-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);
+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;
 }
 }
 }
-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)
+{
+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 = 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++;
-}
-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++;
-}
-else if(type1)
-{
-unsigned int valid = 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(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++;
+exp->__anon1.op.exp1->destType = exp->destType;
+exp->__anon1.op.exp1->opDestType = 1;
+if(exp->destType)
+exp->destType->refCount++;
 }
-if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
+else if(!assign)
 {
 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++;
+exp->__anon1.op.exp1->destType = dummy;
+dummy->refCount++;
 }
-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(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
+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(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->__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));
 }
-else if(op2IsEnum && exp->__anon1.op.exp1->expType)
+if(exp->__anon1.op.exp2)
 {
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
+if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
 {
-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;
+struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp1->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp1->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp1->expType->kind, type);
+
+FreeType(exp->__anon1.op.exp1->expType);
+exp->__anon1.op.exp1->expType = type;
 }
 }
+type1 = exp->__anon1.op.exp1->expType;
 }
-else
+if(exp->__anon1.op.exp2)
 {
-if(op1IsEnum && exp->__anon1.op.exp2->expType)
+char expString[10240];
+
+expString[0] = '\0';
+if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
 {
-if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
+if(exp->__anon1.op.exp1)
 {
-if(exp->expType)
-FreeType(exp->expType);
-exp->expType = exp->__anon1.op.exp1->expType;
+exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
 if(exp->__anon1.op.exp1->expType)
 exp->__anon1.op.exp1->expType->refCount++;
-valid = 1;
 }
-}
-else if(op2IsEnum && exp->__anon1.op.exp1->expType)
-{
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
+else
 {
-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->__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;
 }
-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(assign)
 {
-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(inCompiler)
+PrintExpression(exp->__anon1.op.exp2, expString);
+if(type1 && type1->kind == 13)
 {
-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(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++;
-if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
-{
-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)
-{
-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)
-{
-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)
-{
-exp->expType = exp->__anon1.op.exp2->expType;
-if(exp->__anon1.op.exp2->expType)
-exp->__anon1.op.exp2->expType->refCount++;
-}
-}
 }
 }
-}
-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;
-}
-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(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(type1 && 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);
-}
-if(exp->__anon1.op.op == '!')
 {
-exp->expType = MkClassType("bool");
-exp->expType->truth = 1;
-}
+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 = type2;
-if(type2)
-type2->refCount++;
+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(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
+else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
 {
-if(type2 && 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 = 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 = 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->__anon1.op.exp2->destType = dummy;
+dummy->refCount++;
 }
-exp->expType = type1;
-if(type1)
+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++;
 }
-}
-yylloc = exp->loc;
-if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
+if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
+exp->__anon1.op.exp2->destType->count++;
+if(exp->__anon1.op.op == SIZEOF)
 {
-char expString[10000];
+struct Expression * e = exp->__anon1.op.exp2;
 
-expString[0] = '\0';
-if(inCompiler)
+while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
 {
-PrintExpression(exp->__anon1.op.exp1, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+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(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)
+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 && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
 {
-char expString[10240];
-
-expString[0] = '\0';
-if(inCompiler)
+if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
 {
-PrintExpression(exp->__anon1.op.exp2, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp2->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp2->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp2->expType->kind, type);
+
+FreeType(exp->__anon1.op.exp2->expType);
+exp->__anon1.op.exp2->expType = type;
 }
-if(expString[0])
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
 }
-if(boolResult)
+if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
 {
-FreeType(exp->expType);
-exp->expType = MkClassType("bool");
-exp->expType->truth = 1;
+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))));
 }
-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)
+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)))
 {
-DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
+if(exp->__anon1.op.op == ADD_ASSIGN)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)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;
+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))));
 }
-case 5:
-case 32:
+else if(inCompiler)
 {
-struct Expression * e;
+char type1String[1024];
+char type2String[1024];
 
-exp->isConstant = 1;
-for(e = (*exp->__anon1.list).first; e; e = e->next)
-{
-if(!e->next)
-{
-FreeType(e->destType);
-e->opDestType = exp->opDestType;
-e->destType = exp->destType;
-if(e->destType)
-{
-exp->destType->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);
 }
 }
-ProcessExpressionType(e);
-if(!exp->expType && !e->next)
+if(exp->__anon1.op.exp2->destType == dummy)
 {
-exp->expType = e->expType;
-if(e->expType)
-e->expType->refCount++;
+FreeType(dummy);
+exp->__anon1.op.exp2->destType = (((void *)0));
 }
-if(!e->isConstant)
-exp->isConstant = 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;
 }
-e = (*exp->__anon1.list).first;
-if(!e->next && e->type == 8)
+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))
 {
-struct Expression * next = exp->next, * prev = exp->prev;
+type2 = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-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);
+__ecereInstance1->kind = 3, __ecereInstance1;
+});
+type2->refCount = 1;
+type2->isSigned = 1;
 }
-break;
+else
+{
+type2 = exp->__anon1.op.exp2->expType;
+if(type2)
+type2->refCount++;
 }
-case 6:
+}
+dummy->kind = 0;
+if(exp->__anon1.op.op == SIZEOF)
 {
-struct Expression * e;
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+});
 exp->isConstant = 1;
-ProcessExpressionType(exp->__anon1.index.exp);
-if(!exp->__anon1.index.exp->isConstant)
-exp->isConstant = 0;
-if(exp->__anon1.index.exp->expType)
-{
-struct Type * source = exp->__anon1.index.exp->expType;
-
-if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
-{
-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)
+}
+else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
 {
-exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
-if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
+exp->expType = Dereference(type2);
+if(type2 && type2->kind == 8)
+notByReference = 1;
+}
+else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
+exp->expType = Reference(type2);
+else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
 {
-struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
-
-if(type->kind == 8)
-type->constant = 1;
-else if(type->kind == 13)
+if(exp->__anon1.op.exp1->expType)
 {
-struct Type * t = type;
-
-while(t->kind == 13)
-t = t->__anon1.type;
-t->constant = 1;
+exp->expType = exp->__anon1.op.exp1->expType;
+exp->expType->refCount++;
 }
-((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
 }
+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;
 }
+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;
 }
 }
-for(e = (*exp->__anon1.index.index).first; e; e = e->next)
+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(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
+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(e->destType)
-FreeType(e->destType);
-e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
-}
-ProcessExpressionType(e);
-if(!e->next)
+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++;
 }
-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(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++;
 }
-case 7:
+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 * e;
-struct Type * functionType;
-struct Type * methodType = (((void *)0));
-char name[1024];
+struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
 
-name[0] = '\0';
-if(inCompiler)
+if(argExp)
 {
-PrintExpression(exp->__anon1.call.exp, name);
-if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
+struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
+
+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)
 {
-PrintExpression(exp->__anon1.call.exp, name);
+ProcessExpressionType(classExp);
+exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
+if(!exp->__anon1.op.exp2->expType)
+{
+if(type2)
+FreeType(type2);
+type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
+type2->refCount++;
 }
+ProcessExpressionType(exp->__anon1.op.exp2);
 }
-if(exp->__anon1.call.exp->type == 0)
-{
-struct Expression * idExp = exp->__anon1.call.exp;
-struct Identifier * id = idExp->__anon1.__anon1.identifier;
-
-if(!strcmp(id->string, "__builtin_frame_address"))
-{
-exp->expType = ProcessTypeString("void *", 1);
-if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
-ProcessExpressionType((*exp->__anon1.call.arguments).first);
-break;
 }
-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(!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)))
 {
-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(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++;
+}
+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)))
 {
-a = (*exp->__anon1.call.arguments).first;
-b = (*exp->__anon1.call.arguments).last;
-tempExp1 = a;
-tempExp2 = b;
+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++;
 }
-else if((*exp->__anon1.call.arguments).count == 1)
+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))
 {
-a = (*exp->__anon1.call.arguments).first;
-tempExp1 = a;
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
 }
-if(a)
+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))
+unsigned int success = 0;
+
+if(type1->kind == 13 && type2->kind == 13)
 {
-if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
+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(inCompiler)
+if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
 {
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
-struct Declaration * decl;
-char temp1[1024], temp2[1024];
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-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(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
+__ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
+});
+success = 1;
+if(type1->__anon1.type->kind == 20)
 {
-int op = (!strcmp(id->string, "Max")) ? '>' : '<';
+struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
 
-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"))
+if(argExp)
 {
-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++;
+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 if(!strcmp(id->string, "Sgn"))
-{
-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(!success && exp->__anon1.op.exp1->type == 2)
 {
-struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
-
-if(!exp->__anon1.call.exp->destType)
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
 {
-exp->__anon1.call.exp->destType = dummy;
-dummy->refCount++;
+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;
 }
-ProcessExpressionType(exp->__anon1.call.exp);
-if(exp->__anon1.call.exp->destType == dummy)
+else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
 {
-FreeType(dummy);
-exp->__anon1.call.exp->destType = (((void *)0));
+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;
 }
-FreeType(dummy);
 }
-functionType = exp->__anon1.call.exp->expType;
-if(functionType && functionType->kind == 16)
-{
-methodType = functionType;
-functionType = methodType->__anon1.__anon3.method->dataType;
-if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
+else if(!success)
 {
-char typeString[1024];
-
-typeString[0] = '\0';
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
 {
-struct Symbol * back = functionType->__anon1.__anon2.thisClass;
-
-functionType->__anon1.__anon2.thisClass = (((void *)0));
-PrintType(functionType, typeString, 1, 1);
-functionType->__anon1.__anon2.thisClass = back;
+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;
 }
-if(strstr(typeString, "thisclass"))
+else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
 {
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-
+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 Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
+char expString1[10240];
+char expString2[10240];
+char type1[1024];
+char type2[1024];
 
-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);
+expString1[0] = '\0';
+expString2[0] = '\0';
+type1[0] = '\0';
+type2[0] = '\0';
+if(inCompiler)
 {
-struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
-
-thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
-ProcessDeclarator(decl, 1);
-thisClass = backupThisClass;
+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);
 }
-thisClassParams = 1;
-functionType = ProcessType(specs, decl);
-functionType->refCount = 0;
-FinishTemplatesContext(context);
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
 }
-FreeList(specs, (void *)(FreeSpecifier));
-FreeDeclarator(decl);
 }
 }
+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(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
+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)
 {
-struct Type * type = functionType->__anon1.type;
+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)
+{
+unsigned int valid = 0;
 
-if(!functionType->refCount)
+if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
 {
-functionType->__anon1.type = (((void *)0));
-FreeType(functionType);
-}
-functionType = type;
+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(functionType && functionType->kind != 11)
+if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
 {
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
+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++;
 }
-else if(functionType)
+if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
 {
-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 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(!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(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
 {
-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(op1IsEnum && exp->__anon1.op.exp2->expType)
 {
-type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
-if(e)
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
 {
-e->destType = type;
-e = e->next;
-type = functionType->__anon1.__anon2.params.first;
+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
-type->refCount = 0;
 }
-else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
+else if(op2IsEnum && exp->__anon1.op.exp1->expType)
 {
-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(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
 {
-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
-type->refCount = 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;
 }
 }
-if(type && type->kind == 0)
-{
-noParams = 1;
-if(!type->refCount)
-FreeType(type);
-type = (((void *)0));
 }
-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(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 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)
 {
-struct __ecereNameSpace__ecere__com__Class * sClass;
-
-for(sClass = _class; sClass; sClass = sClass->base)
+if(op1IsEnum && exp->__anon1.op.exp2->expType)
 {
-if(sClass->templateClass)
-sClass = sClass->templateClass;
-id = 0;
-for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
+if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 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->expType;
+if(exp->__anon1.op.exp1->expType)
+exp->__anon1.op.exp1->expType->refCount++;
+valid = 1;
+}
+}
+else if(op2IsEnum && exp->__anon1.op.exp1->expType)
 {
-struct __ecereNameSpace__ecere__com__Class * nextClass;
-
-for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
 {
-if(nextClass->templateClass)
-nextClass = nextClass->templateClass;
-id += nextClass->templateParams.count;
+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;
 }
-break;
 }
-id++;
 }
-if(curParam)
-break;
+}
+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(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(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
+else
 {
-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;
+type1->refCount++;
+if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
 {
-struct Context * context = SetupTemplatesContext(_class);
-
-templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-FinishTemplatesContext(context);
+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++;
 }
-if(templatedType->kind == 8 && constant)
-templatedType->constant = 1;
-else if(templatedType->kind == 13)
+else if(type1 && type2)
 {
-struct Type * t = templatedType->__anon1.type;
+char expString1[10240];
+char expString2[10240];
+char type1String[1024];
+char type2String[1024];
 
-while(t->kind == 13)
-t = t->__anon1.type;
-if(constant)
-t->constant = constant;
-}
-e->destType = templatedType;
-if(templatedType)
+expString1[0] = '\0';
+expString2[0] = '\0';
+type1String[0] = '\0';
+type2String[0] = '\0';
+if(inCompiler)
 {
-templatedType->passAsTemplate = 1;
+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)
+{
+exp->expType = exp->__anon1.op.exp1->expType;
+if(exp->__anon1.op.exp1->expType)
+exp->__anon1.op.exp1->expType->refCount++;
 }
-else
+else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
 {
-e->destType = type;
-if(type)
-type->refCount++;
+exp->expType = exp->__anon1.op.exp2->expType;
+if(exp->__anon1.op.exp2->expType)
+exp->__anon1.op.exp2->expType->refCount++;
 }
 }
-else
-{
-if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
-{
-e->destType = type->prev;
-e->destType->refCount++;
 }
-else
-{
-e->destType = type;
-if(type)
-type->refCount++;
 }
 }
-if(type && type->kind != 14)
+else if(type2)
 {
-struct Type * next = type->next;
+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;
 
-if(!type->refCount)
-FreeType(type);
-type = next;
-}
+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(type && type->kind != 14)
+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)
-{
-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)
+}
+else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
 {
-if(exp->destType)
+if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
 {
-functionType->__anon1.__anon2.returnType = exp->destType;
-exp->destType->refCount++;
+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);
 }
+if(exp->__anon1.op.op == '!')
+{
+exp->expType = MkClassType("bool");
+exp->expType->truth = 1;
 }
 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;
+{
+exp->expType = type2;
+if(type2)
+type2->refCount++;
 }
 }
-else if(exp->__anon1.call.exp->type == 8)
+else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
 {
-}
-else
-Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
-if(!functionType->__anon1.__anon2.returnType)
+if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
 {
-functionType->__anon1.__anon2.returnType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
-});
+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(functionType && functionType->kind == 11)
+yylloc = exp->loc;
+if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
 {
-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)
+char expString[10000];
+
+expString[0] = '\0';
+if(inCompiler)
 {
-for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
-ProcessExpressionType(e);
+PrintExpression(exp->__anon1.op.exp1, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-break;
+if(expString[0])
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
 }
-case 8:
+if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
 {
-struct Type * type;
-struct Location oldyylloc = yylloc;
-unsigned int thisPtr;
-struct Expression * checkExp = exp->__anon1.member.exp;
+char expString[10240];
 
-while(checkExp)
+expString[0] = '\0';
+if(inCompiler)
 {
-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;
+PrintExpression(exp->__anon1.op.exp2, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-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(expString[0])
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
+}
+if(boolResult)
 {
-exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
+FreeType(exp->expType);
+exp->expType = MkClassType("bool");
+exp->expType->truth = 1;
 }
-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 != 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)
 {
-exp->isConstant = 0;
+DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
 }
-else
-exp->isConstant = exp->__anon1.member.exp->isConstant;
-type = exp->__anon1.member.exp->expType;
-yylloc = exp->loc;
-if(type && (type->kind == 20))
+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__Class * _class = thisClass ? thisClass : currentClass;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
+struct Expression * e;
 
-if(_class)
+exp->isConstant = 1;
+for(e = (*exp->__anon1.list).first; e; e = e->next)
 {
-for(param = _class->templateParams.first; param; param = param->next)
+if(!e->next)
 {
-if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
-break;
+FreeType(e->destType);
+e->opDestType = exp->opDestType;
+e->destType = exp->destType;
+if(e->destType)
+{
+exp->destType->refCount++;
 }
 }
-if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
-{
-struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
-
-if(argExp)
+ProcessExpressionType(e);
+if(!exp->expType && !e->next)
 {
-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);
+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 * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
+struct Expression * next = exp->next, * prev = exp->prev;
 
-if(colon)
-{
-memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
-thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\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);
 }
-else
-strcpy(thisClassTypeString, _class->fullName);
+break;
 }
-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)
+case 6:
 {
-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;
+struct Expression * e;
 
-sprintf(templateString, "%s<", expClass->templateClass->fullName);
-for(cClass = expClass; cClass; cClass = cClass->base)
+exp->isConstant = 1;
+ProcessExpressionType(exp->__anon1.index.exp);
+if(!exp->__anon1.index.exp->isConstant)
+exp->isConstant = 0;
+if(exp->__anon1.index.exp->expType)
 {
-int p = 0;
+struct Type * source = exp->__anon1.index.exp->expType;
 
-for(param = cClass->templateParams.first; param; param = param->next)
+if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
 {
-int id = p;
-struct __ecereNameSpace__ecere__com__Class * sClass;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
+struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
+struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
 
-for(sClass = cClass->base; sClass; sClass = sClass->base)
-id += sClass->templateParams.count;
-arg = expClass->templateArgs[id];
-for(sClass = _class; sClass; sClass = sClass->base)
+if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
 {
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
-int p = 0;
-struct __ecereNameSpace__ecere__com__Class * nextClass;
+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);
 
-for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
-p += nextClass->templateParams.count;
-for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
+if(type->kind == 8)
+type->constant = 1;
+else if(type->kind == 13)
 {
-if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
+struct Type * t = type;
+
+while(t->kind == 13)
+t = t->__anon1.type;
+t->constant = 1;
+}
+((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
+}
+}
+}
+}
+for(e = (*exp->__anon1.index.index).first; e; e = e->next)
 {
-if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
 {
-arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
-arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
-break;
+if(e->destType)
+FreeType(e->destType);
+e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
 }
+ProcessExpressionType(e);
+if(!e->next)
+{
 }
+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;
 }
+case 7:
 {
-char argument[256];
+struct Expression * e;
+struct Type * functionType;
+struct Type * methodType = (((void *)0));
+char name[1024];
 
-argument[0] = '\0';
-switch(param->type)
+name[0] = '\0';
+if(inCompiler)
 {
-case 2:
+PrintExpression(exp->__anon1.call.exp, name);
+if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
 {
-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);
+PrintExpression(exp->__anon1.call.exp, name);
+}
+}
+if(exp->__anon1.call.exp->type == 0)
+{
+struct Expression * idExp = exp->__anon1.call.exp;
+struct Identifier * id = idExp->__anon1.__anon1.identifier;
 
-exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
-(__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
-ProcessExpressionType(exp);
-ComputeExpression(exp);
-expString[0] = '\0';
-PrintExpression(exp, expString);
-strcat(argument, expString);
-FreeExpression(exp);
+if(!strcmp(id->string, "__builtin_frame_address"))
+{
+exp->expType = ProcessTypeString("void *", 1);
+if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
+ProcessExpressionType((*exp->__anon1.call.arguments).first);
 break;
 }
-case 1:
+else if(!strcmp(id->string, "__ENDIAN_PAD"))
 {
-strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
+exp->expType = ProcessTypeString("int", 1);
+if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
+ProcessExpressionType((*exp->__anon1.call.arguments).first);
 break;
 }
-case 0:
+else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
 {
-if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
+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(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
-strcat(argument, thisClassTypeString);
-else
-strcat(argument, arg.__anon1.__anon1.dataTypeString);
-}
-break;
+a = (*exp->__anon1.call.arguments).first;
+b = (*exp->__anon1.call.arguments).last;
+tempExp1 = a;
+tempExp2 = b;
 }
+else if((*exp->__anon1.call.arguments).count == 1)
+{
+a = (*exp->__anon1.call.arguments).first;
+tempExp1 = a;
 }
-if(argument[0])
+if(a)
 {
-if(paramCount)
-strcat(templateString, ", ");
-if(lastParam != p - 1)
+__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))
 {
-strcat(templateString, param->name);
-strcat(templateString, " = ");
-}
-strcat(templateString, argument);
-paramCount++;
-lastParam = p;
-}
-p++;
-}
-}
-}
+if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
 {
-int len = strlen(templateString);
-
-if(templateString[len - 1] == '>')
-templateString[len++] = ' ';
-templateString[len++] = '>';
-templateString[len++] = '\0';
-}
+if(inCompiler)
 {
-struct Context * context = SetupTemplatesContext(_class);
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
+struct Declaration * decl;
+char temp1[1024], temp2[1024];
 
-FreeType(exp->expType);
-exp->expType = ProcessTypeString(templateString, 0);
-FinishTemplatesContext(context);
-}
+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(!__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(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);
 }
-else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
-{
-type = ProcessTemplateParameterType(type->__anon1.templateParameter);
 }
 }
-if(type && (type->kind == 20))
-;
-else if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15 || type->kind == 4 || type->kind == 2 || type->kind == 5 || type->kind == 1 || type->kind == 24 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->__anon1.type->kind == 1)))
+if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
 {
-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));
+int op = (!strcmp(id->string, "Max")) ? '>' : '<';
 
-if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
-{
-_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
-typeKind = 8;
+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++;
 }
-if(id)
-{
-if(typeKind == 3 || typeKind == 15)
-_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
-else if(!_class)
-{
-if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
+else if(!strcmp(id->string, "Abs"))
 {
-_class = type->__anon1._class->__anon1.registered;
+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((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
+else if(!strcmp(id->string, "Sgn"))
 {
-_class = FindClass("char *")->__anon1.registered;
+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;
+}
 }
-else if(type->kind == 13)
-{
-_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
-FreeType(exp->expType);
-exp->expType = ProcessTypeString("uintptr", 0);
-exp->byReference = 1;
 }
-else
 {
-char string[1024] = "";
-struct Symbol * classSym;
+struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
 
-PrintTypeNoConst(type, string, 0, 1);
-classSym = FindClass(string);
-if(classSym)
-_class = classSym->__anon1.registered;
+if(!exp->__anon1.call.exp->destType)
+{
+exp->__anon1.call.exp->destType = dummy;
+dummy->refCount++;
 }
+ProcessExpressionType(exp->__anon1.call.exp);
+if(exp->__anon1.call.exp->destType == dummy)
+{
+FreeType(dummy);
+exp->__anon1.call.exp->destType = (((void *)0));
 }
+FreeType(dummy);
 }
-if(_class && id)
-{
-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(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)
+functionType = exp->__anon1.call.exp->expType;
+if(functionType && functionType->kind == 16)
 {
-if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
+methodType = functionType;
+functionType = methodType->__anon1.__anon3.method->dataType;
+if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
 {
-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)
+char typeString[1024];
+
+typeString[0] = '\0';
 {
-prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
-if(prop)
-member = (((void *)0));
-}
-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;
+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"))
 {
-unsigned int useMemberForNonConst = 0;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
 
-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)));
+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);
+{
+struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
+
+thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
+ProcessDeclarator(decl, 1);
+thisClass = backupThisClass;
 }
-if((!prop || useMemberForNonConst) && !member)
+thisClassParams = 1;
+functionType = ProcessType(specs, decl);
+functionType->refCount = 0;
+FinishTemplatesContext(context);
 {
-method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
-if(!method)
+struct Type * p, * op;
+
+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)
 {
-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)));
+if(op->kind == 21)
+p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
 }
 }
-if(member && prop)
+if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
 {
-if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
-prop = (((void *)0));
-else
-member = (((void *)0));
-}
+functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
 }
 }
-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);
+FreeList(specs, (void *)(FreeSpecifier));
+FreeDeclarator(decl);
 }
-else
-{
-char structName[1024];
-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, 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
+if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
 {
-struct Symbol * classSym = FindClass(id->string);
+struct Type * type = functionType->__anon1.type;
 
-if(classSym)
+if(!functionType->refCount)
 {
-struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
-
-if(convertClass)
-revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
-}
+functionType->__anon1.type = (((void *)0));
+FreeType(functionType);
 }
+functionType = type;
 }
-if(exp->__anon1.member.exp->destType)
-FreeType(exp->__anon1.member.exp->destType);
+if(functionType && functionType->kind != 11)
 {
-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);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1;
-});
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
 }
-if(prop)
-{
-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)
+else if(functionType)
 {
-struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+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;
 
-CopyTypeInto(type, exp->expType);
-type->refCount = 1;
-type->constant = 1;
-exp->expType = type;
-}
-else if(prop->dataType)
-prop->dataType->refCount++;
+if(!type)
+emptyParams = 1;
+if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
+{
+e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
+e = e->next;
 }
-else if(member)
+if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
 {
-if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
+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)
 {
-FreeExpContents(exp);
-exp->type = 0;
-exp->__anon1.__anon1.identifier = MkIdentifier("class");
-ProcessExpressionType(exp);
-return ;
-}
-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)
+type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
+if(e)
 {
-struct Context * context = SetupTemplatesContext(_class);
-
-member->dataType = ProcessTypeString(member->dataTypeString, 0);
-FinishTemplatesContext(context);
-}
-exp->expType = member->dataType;
-if(member->dataType)
-member->dataType->refCount++;
+e->destType = type;
+e = e->next;
+type = functionType->__anon1.__anon2.params.first;
 }
-else if(revConvert)
-{
-exp->__anon1.member.memberType = 4;
-exp->expType = MkClassType(revConvert->_class->fullName);
+else
+type->refCount = 0;
 }
-else if(method)
+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)
 {
-exp->__anon1.member.memberType = 2;
+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;
 }
-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(!classProp)
-{
-if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
+}
+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++;
@@ -17530,174 +17381,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 constant = type->constant;
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
 
-FreeType(exp->expType);
-exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-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(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
-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;
-
-while(t->kind == 13)
-t = t->__anon1.type;
-if(constant)
-t->constant = constant;
+e->destType = type->prev;
+e->destType->refCount++;
 }
-if(exp->destType->kind == 21)
+else
 {
-FreeType(exp->destType);
-exp->destType = ReplaceThisClassType(_class);
+e->destType = type;
+if(type)
+type->refCount++;
+}
 }
+if(type && type->kind != 14)
+{
+struct Type * next = type->next;
+
+if(!type->refCount)
+FreeType(type);
+type = next;
 }
 }
-FinishTemplatesContext(context);
+if(type && type->kind != 14)
+{
+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 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
 {
-int id = 0;
-struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
-struct __ecereNameSpace__ecere__com__Class * sClass;
+functionType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-for(sClass = tClass; sClass; sClass = sClass->base)
+__ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
+});
+if(exp->__anon1.call.exp->type == 0)
 {
-id = 0;
-if(sClass->templateClass)
-sClass = sClass->templateClass;
-for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
+char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
+
+if(inCompiler)
 {
-if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
+struct Symbol * symbol;
+struct Location oldyylloc = yylloc;
+
+yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
+if(strstr(string, "__builtin_") == string)
 {
-for(sClass = sClass->base; sClass; sClass = sClass->base)
-id += sClass->templateParams.count;
-break;
+if(exp->destType)
+{
+functionType->__anon1.__anon2.returnType = exp->destType;
+exp->destType->refCount++;
 }
-id++;
 }
-if(curParam)
+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)
+{
+functionType->__anon1.__anon2.returnType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
+});
+}
+}
+if(functionType && functionType->kind == 11)
+{
+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)
+{
+for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
+ProcessExpressionType(e);
+}
 break;
 }
-if(curParam)
+case 8:
 {
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
-struct Context * context = SetupTemplatesContext(tClass);
-struct Type * basicType;
+struct Type * type;
+struct Location oldyylloc = yylloc;
+unsigned int thisPtr;
+struct Expression * checkExp = exp->__anon1.member.exp;
 
-basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
-if(basicType)
+while(checkExp)
 {
-if(basicType->kind == 21)
+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)
 {
-FreeType(basicType);
-basicType = ReplaceThisClassType(_class);
+exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
 }
-FreeType(exp->expType);
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+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;
+}
+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));
 
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
-});
-if(!exp->destType)
+if(_class)
 {
-exp->destType = exp->expType;
-exp->destType->refCount++;
+for(param = _class->templateParams.first; param; param = param->next)
+{
+if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
+break;
 }
+}
+if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
+{
+struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
+
+if(argExp)
 {
-struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+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];
 
@@ -17730,1424 +17664,1683 @@ 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;
 }
 }
-if(argument[0])
+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';
+}
+{
+struct Context * context = SetupTemplatesContext(_class);
+
+FreeType(exp->expType);
+exp->expType = ProcessTypeString(templateString, 0);
+FinishTemplatesContext(context);
+}
+}
+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")))))))));
+}
+}
+else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
+{
+type = ProcessTemplateParameterType(type->__anon1.templateParameter);
+}
+}
+if(type && (type->kind == 20))
+;
+else if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15 || type->kind == 4 || type->kind == 2 || type->kind == 5 || type->kind == 1 || type->kind == 24 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->__anon1.type->kind == 1)))
+{
+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));
+
+if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
+{
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
+typeKind = 8;
+}
+if(id)
+{
+if(typeKind == 3 || typeKind == 15)
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
+else if(!_class)
+{
+if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
+{
+_class = type->__anon1._class->__anon1.registered;
+}
+else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
+{
+_class = FindClass("char *")->__anon1.registered;
+}
+else if(type->kind == 13)
+{
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
+FreeType(exp->expType);
+exp->expType = ProcessTypeString("uintptr", 0);
+exp->byReference = 1;
+}
+else
+{
+char string[1024] = "";
+struct Symbol * classSym;
+
+PrintTypeNoConst(type, string, 0, 1);
+classSym = FindClass(string);
+if(classSym)
+_class = classSym->__anon1.registered;
+}
+}
+}
+if(_class && id)
+{
+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(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)
+{
+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));
+}
+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)
+{
+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)));
+}
+}
+if(member && prop)
+{
+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
+{
+char structName[1024];
+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, 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
 {
-if(paramCount)
-strcat(templateString, ", ");
-if(lastParam != p - 1)
+struct Symbol * classSym = FindClass(id->string);
+
+if(classSym)
 {
-strcat(templateString, param->name);
-strcat(templateString, " = ");
-}
-strcat(templateString, argument);
-paramCount++;
-lastParam = p;
-}
+struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
+
+if(convertClass)
+revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
 }
-p++;
 }
 }
+if(exp->__anon1.member.exp->destType)
+FreeType(exp->__anon1.member.exp->destType);
 {
-int len = strlen(templateString);
+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);
 
-if(templateString[len - 1] == '>')
-templateString[len++] = ' ';
-templateString[len++] = '>';
-templateString[len++] = '\0';
+__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;
+});
 }
-FreeType(exp->expType);
+if(prop)
 {
-struct Context * context = SetupTemplatesContext(tClass);
+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)
+{
+struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-exp->expType = ProcessTypeString(templateString, 0);
-FinishTemplatesContext(context);
+CopyTypeInto(type, exp->expType);
+type->refCount = 1;
+type->constant = 1;
+exp->expType = type;
 }
+else if(prop->dataType)
+prop->dataType->refCount++;
 }
+else if(member)
+{
+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 ;
 }
+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)
+{
+struct Context * context = SetupTemplatesContext(_class);
+
+member->dataType = ProcessTypeString(member->dataTypeString, 0);
+FinishTemplatesContext(context);
 }
+if(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 == 2)
+member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
+exp->expType = member->dataType;
+if(member->dataType)
+member->dataType->refCount++;
 }
-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(revConvert)
+{
+exp->__anon1.member.memberType = 4;
+exp->expType = MkClassType(revConvert->_class->fullName);
 }
-else if(type && (type->kind == 9 || type->kind == 10))
+else if(method)
 {
-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++;
+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
+else if(!classProp)
 {
-char expString[10240];
-
-expString[0] = '\0';
-if(inCompiler)
+if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
 {
-PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+FreeExpContents(exp);
+exp->type = 0;
+exp->__anon1.__anon1.identifier = MkIdentifier("class");
+FreeType(exp->expType);
+exp->expType = MkClassType("ecere::com::Class");
+return ;
 }
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
+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(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
+if(_class && exp->expType)
 {
-if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
+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)
 {
-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));
+int id = 0;
+struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
+struct __ecereNameSpace__ecere__com__Class * sClass;
 
-if(_class)
+for(sClass = tClass; sClass; sClass = sClass->base)
 {
-FreeType(exp->expType);
-exp->expType = ReplaceThisClassType(_class);
-}
-}
-}
-yylloc = oldyylloc;
-break;
-}
-case 9:
+id = 0;
+if(sClass->templateClass)
+sClass = sClass->templateClass;
+for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
 {
-struct Type * destType = exp->destType;
-
-if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
+if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
 {
-exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
+for(sClass = sClass->base; sClass; sClass = sClass->base)
+id += sClass->templateParams.count;
+break;
 }
-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--;
+id++;
+}
+if(curParam)
 break;
 }
-case 15:
+if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
 {
-struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
+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(classSym && classSym->__anon1.registered)
-{
-if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
+if(t && t->kind == 8 && t->__anon1._class)
+thisClassFrom = t->__anon1._class->__anon1.registered;
+else
+thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
+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)
 {
-char name[1024];
-struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
+struct Type * t = exp->expType->__anon1.type;
 
-name[0] = '\0';
-DeclareStruct(curExternal, classSym->string, 0, 1);
-FreeSpecifier(exp->__anon1._class);
-FullClassNameCat(name, classSym->string, 0);
-if(b->offset == 0)
+while(t->kind == 13)
+t = t->__anon1.type;
+if(constant)
+t->constant = constant;
+}
+if(exp->expType)
 {
-exp->type = 10;
-exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
+if(exp->expType->kind == 21)
+{
+FreeType(exp->expType);
+exp->expType = ReplaceThisClassType(_class);
 }
-else
+if(passAsTemplate)
+exp->expType->passAsTemplate = 1;
+if(!exp->destType)
 {
-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)
+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 Symbol * sym;
-struct Expression * typeSize;
+struct Type * t = exp->destType->__anon1.type;
 
-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;
+while(t->kind == 13)
+t = t->__anon1.type;
+if(constant)
+t->constant = constant;
+}
+if(exp->destType->kind == 21)
+{
+FreeType(exp->destType);
+exp->destType = ReplaceThisClassType(_class);
 }
 }
 }
-else
+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)
 {
-if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
+id = 0;
+if(sClass->templateClass)
+sClass = sClass->templateClass;
+for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
 {
-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
+if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
 {
-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");
-}
+for(sClass = sClass->base; sClass; sClass = sClass->base)
+id += sClass->templateParams.count;
+break;
 }
+id++;
 }
-exp->expType = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
-
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
-});
+if(curParam)
 break;
 }
-case 10:
+if(curParam)
 {
-struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
+struct Context * context = SetupTemplatesContext(tClass);
+struct Type * basicType;
 
+basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
+if(basicType)
+{
+if(basicType->kind == 21)
+{
+FreeType(basicType);
+basicType = ReplaceThisClassType(_class);
+}
+FreeType(exp->expType);
 exp->expType = __extension__ ({
 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
 });
-exp->isConstant = 1;
-DeclareType(curExternal, type, 1, 0);
-FreeType(type);
-break;
-}
-case 11:
+if(!exp->destType)
 {
-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))
+exp->destType = exp->expType;
+exp->destType->refCount++;
+}
 {
-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 Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
 
-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;
+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;
 }
-else
-{
-exp->isConstant = exp->__anon1.cast.exp->isConstant;
 }
-break;
+FinishTemplatesContext(context);
 }
-case 33:
+}
+else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
 {
-struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
+struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
 
-exp->expType = type;
-break;
-}
-case 34:
+if(expClass)
 {
-struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
+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;
 
-ProcessExpressionType(exp->__anon1.vaArg.exp);
-exp->expType = type;
-break;
-}
-case 12:
+sprintf(templateString, "%s<", expClass->templateClass->fullName);
+while(cClass != expClass)
 {
-struct Expression * e;
-struct Type * t = exp->destType;
+struct __ecereNameSpace__ecere__com__Class * sClass;
 
-if(t && !exp->destType->casted)
+for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
+;
+cClass = sClass;
+for(param = cClass->templateParams.first; param; param = param->next)
 {
-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)
+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;
+
+while(cClassCur != tClass && !paramCur)
 {
-if(!e->next)
+struct __ecereNameSpace__ecere__com__Class * sClassCur;
+
+for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
+;
+cClassCur = sClassCur;
+for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
 {
-FreeType(e->destType);
-e->destType = t;
-if(e->destType)
-e->destType->refCount++;
-}
-ProcessExpressionType(e);
-if(!e->next)
+if(!strcmp(paramCur->name, param->name))
 {
-exp->expType = e->expType;
-if(e->expType)
-e->expType->refCount++;
+break;
 }
-if(!e->isConstant)
-exp->isConstant = 0;
+cp++;
 }
-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(paramCur && paramCur->type == 0)
+arg = tClass->templateArgs[cp];
+else
+arg = expClass->templateArgs[p];
 {
-struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
+char argument[256];
 
-if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
+argument[0] = '\0';
+switch(param->type)
 {
-((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
-if(exp->destType)
-exp->destType->refCount++;
+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);
+
+exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
+(__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
+ProcessExpressionType(exp);
+ComputeExpression(exp);
+expString[0] = '\0';
+PrintExpression(exp, expString);
+strcat(argument, expString);
+FreeExpression(exp);
+break;
 }
-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++;
+case 1:
+{
+strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
+break;
 }
+case 0:
+{
+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;
 }
-case 24:
+}
+if(argument[0])
 {
-struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
-
-if(spec && spec->type == 1)
+if(paramCount)
+strcat(templateString, ", ");
+if(lastParam != p - 1)
 {
-exp->expType = MkClassType(spec->__anon1.__anon1.name);
-exp->expType->kind = 19;
-exp->byReference = 1;
+strcat(templateString, param->name);
+strcat(templateString, " = ");
 }
-else
-{
-exp->expType = MkClassType("ecere::com::Class");
-exp->byReference = 1;
+strcat(templateString, argument);
+paramCount++;
+lastParam = p;
+}
+}
+p++;
 }
-break;
 }
-case 25:
 {
-struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
+int len = strlen(templateString);
 
-if(_class)
+if(templateString[len - 1] == '>')
+templateString[len++] = ' ';
+templateString[len++] = '>';
+templateString[len++] = '\0';
+}
+FreeType(exp->expType);
 {
-struct Identifier * id = exp->__anon1.classData.id;
-char structName[1024];
-struct Expression * classExp;
+struct Context * context = SetupTemplatesContext(tClass);
 
-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 ;
+exp->expType = ProcessTypeString(templateString, 0);
+FinishTemplatesContext(context);
 }
-break;
 }
-case 35:
+}
+}
+}
+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 * type = (((void *)0));
-const char * typeString = (((void *)0));
-char typeStringBuf[1024];
+struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)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))
+if(memberType)
 {
-struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
-
-typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
+exp->expType = memberType;
+if(memberType)
+memberType->refCount++;
 }
-else if(exp->__anon1.list)
+}
+else
 {
-struct Expression * e;
+char expString[10240];
 
-for(e = (*exp->__anon1.list).first; e; e = e->next)
-{
-ProcessExpressionType(e);
-if(e->expType)
-{
-if(!type)
+expString[0] = '\0';
+if(inCompiler)
 {
-type = e->expType;
-type->refCount++;
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-else
-{
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+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))
 {
-FreeType(type);
-type = e->expType;
-e->expType = (((void *)0));
-e = (*exp->__anon1.list).first;
-ProcessExpressionType(e);
-if(e->expType)
+if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
 {
-if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+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(e->expType);
-e->expType = (((void *)0));
-FreeType(type);
-type = (((void *)0));
-break;
+FreeType(exp->expType);
+exp->expType = ReplaceThisClassType(_class);
 }
 }
 }
+yylloc = oldyylloc;
+break;
 }
-if(e->expType)
+case 9:
 {
-FreeType(e->expType);
-e->expType = (((void *)0));
-}
-}
-}
-if(type)
+struct Type * destType = exp->destType;
+
+if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
 {
-typeStringBuf[0] = '\0';
-PrintTypeNoConst(type, typeStringBuf, 0, 1);
-typeString = typeStringBuf;
-FreeType(type);
-type = (((void *)0));
+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;
 }
-if(typeString)
+case 15:
 {
-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)));
+struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
 
-sprintf(templateString, "Container<%s>", typeString);
-if(exp->__anon1.list)
+if(classSym && classSym->__anon1.registered)
 {
-struct Expression * e;
+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;
 
-type = ProcessTypeString(typeString, 0);
-while((e = (*exp->__anon1.list).first))
+name[0] = '\0';
+DeclareStruct(curExternal, classSym->string, 0, 1);
+FreeSpecifier(exp->__anon1._class);
+FullClassNameCat(name, classSym->string, 0);
+if(b->offset == 0)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
-e->destType = type;
-type->refCount++;
-ProcessExpressionType(e);
-ListAdd(initializers, MkInitializerAssignment(e));
-}
-FreeType(type);
-(__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
+exp->type = 10;
+exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)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);
+else
+{
+struct Expression * e;
 
-__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);
-}
+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)
 {
-exp->expType = ProcessTypeString("Container", 0);
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
-}
-break;
+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;
 }
 }
-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)
-{
-struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
-
-if(symbol)
+else
 {
-if(exp->expType->kind != 15)
+if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
 {
-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++;
+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
 {
-struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
-
-for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
-{
-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);
+char className[1024];
 
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
+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");
 }
 }
 }
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+});
+break;
 }
-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))
+case 10:
 {
-unsigned int invalidCast = 0;
+struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
 
-if(inCompiler && exp->destType->count && exp->expType)
-{
-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));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
 
-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;
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
+});
+exp->isConstant = 1;
+DeclareType(curExternal, type, 1, 0);
+FreeType(type);
+break;
 }
-if(!exp->destType->count || unresolved || invalidCast)
-{
-if(!exp->expType)
-{
-yylloc = exp->loc;
-if(exp->destType->kind != 14)
+case 11:
 {
-char type2[1024];
+struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
 
-type2[0] = '\0';
-if(inCompiler)
+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))
 {
-char expString[10240];
+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;
 
-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);
-}
+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
 {
-char expString[10240];
-
-expString[0] = '\0';
-if(inCompiler)
-{
-PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
-}
-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);
+exp->isConstant = exp->__anon1.cast.exp->isConstant;
 }
+break;
 }
-else
+case 33:
 {
-char type1[1024];
-char type2[1024];
+struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
 
-type1[0] = '\0';
-type2[0] = '\0';
-if(inCompiler)
+exp->expType = type;
+break;
+}
+case 34:
 {
-PrintType(exp->expType, type1, 0, 1);
-PrintType(exp->destType, type2, 0, 1);
+struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
+
+ProcessExpressionType(exp->__anon1.vaArg.exp);
+exp->expType = type;
+break;
 }
-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 12:
 {
-char expString[10240];
+struct Expression * e;
+struct Type * t = exp->destType;
 
-expString[0] = '\0';
-if(inCompiler)
+if(t && !exp->destType->casted)
 {
-PrintExpression(exp, expString);
-__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+CopyTypeInto(t, exp->destType);
+t->count = 0;
 }
-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")))
+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(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)
+if(!e->next)
 {
-FreeType(exp->expType);
-exp->destType->refCount++;
-exp->expType = exp->destType;
-}
+FreeType(e->destType);
+e->destType = t;
+if(e->destType)
+e->destType->refCount++;
 }
+ProcessExpressionType(e);
+if(!e->next)
+{
+exp->expType = e->expType;
+if(e->expType)
+e->expType->refCount++;
 }
+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;
 }
-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))
+case 23:
 {
-struct Expression * nbExp = GetNonBracketsExp(exp);
-
-if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
+if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
 {
-struct Expression * e = MoveExpContents(exp);
+struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
 
-exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
-exp->type = 11;
-exp->__anon1.cast.exp->destType = exp->destType;
+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++;
-exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
-}
 }
+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++;
 }
-else if(unresolved)
-{
-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);
+break;
 }
-else if(!exp->expType && exp->type != 16)
+case 24:
 {
-char expString[10240];
+struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
 
-expString[0] = '\0';
-if(inCompiler)
+if(spec && spec->type == 1)
 {
-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);
+exp->expType = MkClassType(spec->__anon1.__anon1.name);
+exp->expType->kind = 19;
+exp->byReference = 1;
 }
-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)))
+else
 {
+exp->expType = MkClassType("ecere::com::Class");
 exp->byReference = 1;
 }
-yylloc = oldyylloc;
+break;
 }
-
-static void ProcessFunction(struct FunctionDefinition * function)
+case 25:
 {
-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;
+struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
 
-yylloc = function->loc;
-if(type && type->__anon1.__anon2.thisClass)
+if(_class)
 {
-struct Symbol * classSym = type->__anon1.__anon2.thisClass;
-struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
-char className[1024];
+struct Identifier * id = exp->__anon1.classData.id;
 char structName[1024];
-struct Declarator * funcDecl;
-struct Symbol * thisSymbol;
-unsigned int typedObject = 0;
+struct Expression * classExp;
+
+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 ;
+}
+break;
+}
+case 35:
+{
+struct Type * type = (((void *)0));
+const char * typeString = (((void *)0));
+char typeStringBuf[1024];
+
+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))
+{
+struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
+
+typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
+}
+else if(exp->__anon1.list)
+{
+struct Expression * e;
 
-if(_class && !_class->base)
+for(e = (*exp->__anon1.list).first; e; e = e->next)
 {
-_class = currentClass;
-if(_class && !_class->symbol)
-_class->symbol = FindClass(_class->fullName);
-classSym = _class ? _class->symbol : (((void *)0));
-typedObject = 1;
+ProcessExpressionType(e);
+if(e->expType)
+{
+if(!type)
+{
+type = e->expType;
+type->refCount++;
 }
-thisClass = _class;
-if(inCompiler && _class)
+else
 {
-if(type->kind == 11)
+if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
 {
-if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
+FreeType(type);
+type = e->expType;
+e->expType = (((void *)0));
+e = (*exp->__anon1.list).first;
+ProcessExpressionType(e);
+if(e->expType)
 {
-struct Type * param = symbol->type->__anon1.__anon2.params.first;
-
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
-FreeType(param);
+if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
+{
+FreeType(e->expType);
+e->expType = (((void *)0));
+FreeType(type);
+type = (((void *)0));
+break;
 }
-if(type->classObjectType != 1)
+}
+}
+}
+if(e->expType)
 {
-__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;
+FreeType(e->expType);
+e->expType = (((void *)0));
 }
 }
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, _class->fullName, 1);
-structName[0] = (char)0;
-FullClassNameCat(structName, _class->fullName, 0);
-funcDecl = GetFuncDecl(function->declarator);
-if(funcDecl)
+}
+if(type)
 {
-if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
+typeStringBuf[0] = '\0';
+PrintTypeNoConst(type, typeStringBuf, 0, 1);
+typeString = typeStringBuf;
+FreeType(type);
+type = (((void *)0));
+}
+}
+if(typeString)
 {
-struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
+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)));
 
-if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
+sprintf(templateString, "Container<%s>", typeString);
+if(exp->__anon1.list)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
-FreeTypeName(param);
+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));
 }
+FreeType(type);
+(__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
 }
-if(!function->propertyNoThis)
-{
-struct TypeName * thisParam = (((void *)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);
 
-if(type->classObjectType != 1)
-{
-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);
+__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);
 }
-if(typedObject)
-{
-if(type->classObjectType != 1)
+else
 {
-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);
+exp->expType = ProcessTypeString("Container", 0);
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
 }
-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);
+break;
 }
 }
+if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
+{
+FreeType(exp->expType);
+exp->expType = ReplaceThisClassType(thisClass);
 }
-if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
+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)
 {
-struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
+struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
 
-funcDecl = GetFuncDecl(initDecl->declarator);
-if(funcDecl)
+if(symbol)
 {
-if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
+if(exp->expType->kind != 15)
 {
-struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
+struct Type * member;
+char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
 
-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);
-}
+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(type->classObjectType != 1)
+else
 {
-if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
+struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
+
+for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
 {
-struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
+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(!funcDecl->__anon1.function.parameters)
-funcDecl->__anon1.function.parameters = MkList();
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
 }
 }
 }
 }
+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;
 }
-if(function->body)
+yylloc = exp->loc;
+if(exp->destType && (exp->destType->kind == 18))
+;
+else if(exp->destType && !exp->destType->keepCast)
 {
-if(type->classObjectType != 1)
+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))
 {
-thisSymbol = __extension__ ({
-struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
+unsigned int invalidCast = 0;
 
-__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)
-{
-thisSymbol->type->classObjectType = 2;
-thisSymbol->type->byReference = type->byReference;
-thisSymbol->type->typedByReference = type->byReference;
-}
-}
-}
-if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
+if(inCompiler && exp->destType->count && exp->expType)
 {
-struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
+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;
+}
+if(!exp->destType->count || unresolved || invalidCast)
 {
-struct __ecereNameSpace__ecere__com__Class * base;
-
-for(base = _class; base && base->type != 1000; base = base->next)
+if(!exp->expType)
 {
-for(member = base->membersAndProperties.first; member; member = member->next)
-if(!member->isProperty)
-break;
-if(member)
-break;
-}
-}
-for(member = _class->membersAndProperties.first; member; member = member->next)
-if(!member->isProperty)
-break;
-if(member)
+yylloc = exp->loc;
+if(exp->destType->kind != 14)
 {
-char pointerName[1024];
-struct Declaration * decl;
-struct Initializer * initializer;
-struct Expression * exp, * bytePtr;
+char type2[1024];
 
-strcpy(pointerName, "__ecerePointer_");
-FullClassNameCat(pointerName, _class->fullName, 0);
+type2[0] = '\0';
+if(inCompiler)
 {
-char className[1024];
+char expString[10240];
 
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(curExternal, classSym, className);
+expString[0] = '\0';
+PrintType(exp->destType, type2, 0, 1);
+if(inCompiler)
+{
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
 }
-bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
-if(_class->fixed)
+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
 {
-struct Expression * e;
+char expString[10240];
 
-if(_class->offset && _class->offset == _class->base->structSize)
+expString[0] = '\0';
+if(inCompiler)
 {
-e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
-ProcessExpressionType(e);
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+}
+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
 {
-char string[256];
+char type1[1024];
+char type2[1024];
 
-sprintf(string, "%d", _class->offset);
-e = MkExpConstant(string);
-}
-exp = QBrackets(MkExpOp(bytePtr, '+', e));
+type1[0] = '\0';
+type2[0] = '\0';
+if(inCompiler)
+{
+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
 {
-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);
+struct Expression * nbExp = GetNonBracketsExp(exp);
+unsigned int skipWarning = 0;
+int kind = exp->destType->kind;
 
-__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
-struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+if(nbExp->type == 12 && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
+skipWarning = 1;
+if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
+{
+int op = nbExp->__anon1.op.op;
+struct Expression * nbExp1, * nbExp2;
+int from;
 
-__ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
-}), __ecereInstance2;
-});
-if(function->body)
+switch(op)
 {
-yylloc = function->body->loc;
-initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
+case '%':
+case '/':
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+from = nbExp1->expType->promotedFrom;
+if(from == 1 || (kind == 2 && from == 2))
+skipWarning = 1;
+break;
+case LEFT_OP:
+case RIGHT_OP:
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
+from = nbExp1->expType->promotedFrom;
+if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
+skipWarning = 1;
+else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
 {
-struct Context * prevContext = curContext;
-struct __ecereNameSpace__ecere__sys__OldList * list;
+int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
+int s = from == 1 ? 8 : 16;
 
-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);
-}
-}
-}
-}
+if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
+s = nbExp1->expType->bitMemberSize;
+if(nbExp->__anon1.op.op == RIGHT_OP)
+s -= n;
 else
-thisClass = (((void *)0));
-if(id)
+s += n;
+if(s <= (kind == 1 ? 8 : 16))
+skipWarning = 1;
+}
+break;
+case '-':
+if(!exp->destType->isSigned)
 {
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
-if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
+from = nbExp2->expType->promotedFrom;
+if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
 {
-struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
+int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
 
-id = GetDeclId(initDecl->declarator);
-FreeSpecifier(id->_class);
-id->_class = (((void *)0));
+if(n == (from == 1 ? 255 : 65535))
+skipWarning = 1;
 }
 }
-if(function->body)
-topContext = function->body->__anon1.compound.context;
+break;
+case '|':
 {
-struct FunctionDefinition * oldFunction = curFunction;
+int kind1, kind2;
 
-curFunction = function;
-if(function->body)
-ProcessStatement(function->body);
-if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
+kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
+kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
+if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) && ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
+skipWarning = 1;
+break;
+}
+case '&':
 {
-struct Statement * prevCompound = curCompound;
-struct Context * prevContext = curContext;
-struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
+int kind1, kind2;
 
-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;
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
+kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
+kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
+if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) || ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
+skipWarning = 1;
+break;
 }
-if(function->declarator)
-{
-ProcessDeclarator(function->declarator, 1);
 }
-topContext = oldTopContext;
-thisClass = oldThisClass;
 }
-
-static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
+if(!skipWarning)
 {
-struct ClassDef * def;
-struct External * external = curExternal;
-struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
+char expString[10240];
 
-for(def = definitions->first; def; def = def->next)
+expString[0] = '\0';
+if(inCompiler)
 {
-if(def->type == 0)
+PrintExpression(exp, expString);
+__ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
+}
+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(def->__anon1.function->declarator)
-curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
+if(invalidCast)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
 else
-curExternal = external;
-ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
+Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
 }
-else if(def->type == 2)
-{
-if(def->__anon1.decl->type == 2)
-{
-thisClass = regClass;
-ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
-thisClass = (((void *)0));
 }
-else
+if(!inCompiler)
 {
-struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
-
-if(regClass)
-thisClass = regClass;
-ProcessDeclaration(def->__anon1.decl);
-thisClass = backThisClass;
+FreeType(exp->expType);
+exp->destType->refCount++;
+exp->expType = exp->destType;
 }
 }
-else if(def->type == 1 && def->__anon1.defProperties)
-{
-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);
-
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
-{
-thisClass = regClass;
-ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
-thisClass = (((void *)0));
 }
-__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-FreeSymbol(thisSymbol);
 }
-else if(def->type == 3 && def->__anon1.propertyDef)
+}
+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 PropertyDef * prop = def->__anon1.propertyDef;
+struct Expression * nbExp = GetNonBracketsExp(exp);
 
-thisClass = regClass;
-if(prop->setStmt)
-{
-if(regClass)
+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->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
-}
-curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
-ProcessStatement(prop->setStmt);
+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))));
 }
-if(prop->getStmt)
-{
-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->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
 }
-curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
-ProcessStatement(prop->getStmt);
 }
-if(prop->issetStmt)
-{
-if(regClass)
+else if(unresolved)
 {
-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);
-}
-thisClass = (((void *)0));
+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(def->type == 4 && def->__anon1.propertyWatch)
+else if(!exp->expType && exp->type != 16)
 {
-struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
+char expString[10240];
 
-thisClass = regClass;
-if(propertyWatch->compound)
+expString[0] = '\0';
+if(inCompiler)
 {
-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);
+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] = 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));
 }
 }
 }