comparison dmd/SymbolExp.d @ 179:cd48cb899aee

Updated to dmd2.040
author korDen
date Sun, 17 Oct 2010 20:56:07 +0400
parents e3afd1303184
children b0d41ff5e0df
comparison
equal deleted inserted replaced
178:e3afd1303184 179:cd48cb899aee
6 import dmd.Loc; 6 import dmd.Loc;
7 import dmd.IRState; 7 import dmd.IRState;
8 import dmd.TOK; 8 import dmd.TOK;
9 import dmd.TY; 9 import dmd.TY;
10 import dmd.Type; 10 import dmd.Type;
11 import dmd.Id;
11 import dmd.SymOffExp; 12 import dmd.SymOffExp;
12 import dmd.FuncDeclaration; 13 import dmd.FuncDeclaration;
13 import dmd.VarDeclaration; 14 import dmd.VarDeclaration;
14 import dmd.backend.OPER; 15 import dmd.backend.OPER;
15 import dmd.backend.TYM; 16 import dmd.backend.TYM;
51 if (op == TOK.TOKvar && var.needThis()) 52 if (op == TOK.TOKvar && var.needThis())
52 { 53 {
53 error("need 'this' to access member %s", toChars()); 54 error("need 'this' to access member %s", toChars());
54 return el_long(TYM.TYint, 0); 55 return el_long(TYM.TYint, 0);
55 } 56 }
57
58 /* The magic variable __ctfe is always false at runtime
59 */
60 if (op == TOKvar && v && v.ident == Id.ctfe)
61 return el_long(type.totym(), 0);
62
56 s = var.toSymbol(); 63 s = var.toSymbol();
57 fd = null; 64 fd = null;
58 if (var.toParent2()) 65 if (var.toParent2())
59 fd = var.toParent2().isFuncDeclaration(); 66 fd = var.toParent2().isFuncDeclaration();
60 67