Ticket #239: bug239.patch
| File bug239.patch, 1.6 kB (added by ChristianK, 3 years ago) |
|---|
-
a/gen/dvalue.cpp
old new 16 16 var = vd; 17 17 val = llvmValue; 18 18 type = t; 19 forceStaticLookup = false; 19 20 } 20 21 21 22 DVarValue::DVarValue(Type* t, LLValue* llvmValue) … … 23 24 var = 0; 24 25 val = llvmValue; 25 26 type = t; 27 forceStaticLookup = false; 26 28 } 27 29 28 30 LLValue* DVarValue::getLVal() -
a/gen/dvalue.h
old new 107 107 108 108 virtual Type*& getType() { assert(type); return type; } 109 109 virtual DVarValue* isVar() { return this; } 110 111 bool forceStaticLookup; 110 112 }; 111 113 112 114 // field d-value -
a/gen/toir.cpp
old new 1105 1105 if (!vthis2) vthis2 = vthis; 1106 1106 1107 1107 // super call 1108 if (e1->op == TOKsuper) { 1108 DVarValue* varl = l->isVar(); 1109 if (e1->op == TOKsuper || (varl && varl->forceStaticLookup)) { 1109 1110 DtoForceDeclareDsymbol(fdecl); 1110 1111 funcval = fdecl->ir.irFunc->func; 1111 1112 assert(funcval); … … 2568 2569 { 2569 2570 Type* t = sym->getType(); 2570 2571 assert(t); 2571 return e1->toElem(p); 2572 DValue* v = e1->toElem(p); 2573 DVarValue* vv = v->isVar(); 2574 assert(vv && "expect exp to be VarValue in <exp>.Type expression"); 2575 vv->forceStaticLookup = true; 2576 return vv; 2572 2577 } 2573 2578 2574 2579 //////////////////////////////////////////////////////////////////////////////////////////

