comparison dmd/TypeidExp.d @ 131:206db751bd4c

dmdfe 2.037 compiles now
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Fri, 10 Sep 2010 00:27:37 +0100
parents 60bb0fe4563e
children af1bebfd96a4
comparison
equal deleted inserted replaced
130:60bb0fe4563e 131:206db751bd4c
6 import dmd.OutBuffer; 6 import dmd.OutBuffer;
7 import dmd.Loc; 7 import dmd.Loc;
8 import dmd.Scope; 8 import dmd.Scope;
9 import dmd.HdrGenState; 9 import dmd.HdrGenState;
10 import dmd.TOK; 10 import dmd.TOK;
11 import dmd.Dsymbol;
12 import dmd.TY;
13 import dmd.Id;
14 import dmd.ErrorExp;
15 import dmd.DotIdExp;
16 import dmd.CommaExp;
17 import dmd.templates.Util;
11 18
12 class TypeidExp : Expression 19 class TypeidExp : Expression
13 { 20 {
14 Object *obj; 21 Object obj;
15 22
16 this(Loc loc, Object o) 23 this(Loc loc, Object o)
17 { 24 {
18 super(loc, TOK.TOKtypeid, TypeidExp.sizeof); 25 super(loc, TOK.TOKtypeid, TypeidExp.sizeof);
19 this.obj = o; 26 this.obj = o;
58 if (!ta) 65 if (!ta)
59 { error("no type for typeid(%s)", ea ? ea.toChars() : (sa ? sa.toChars() : "")); 66 { error("no type for typeid(%s)", ea ? ea.toChars() : (sa ? sa.toChars() : ""));
60 return new ErrorExp(); 67 return new ErrorExp();
61 } 68 }
62 69
63 if (ea && ta.toBasetype().ty == Tclass) 70 if (ea && ta.toBasetype().ty == TY.Tclass)
64 { /* Get the dynamic type, which is .classinfo 71 { /* Get the dynamic type, which is .classinfo
65 */ 72 */
66 e = new DotIdExp(ea.loc, ea, Id.classinfo); 73 e = new DotIdExp(ea.loc, ea, Id.classinfo_);
67 e = e.semantic(sc); 74 e = e.semantic(sc);
68 } 75 }
69 else 76 else
70 { /* Get the static type 77 { /* Get the static type
71 */ 78 */