@property
Adam D. Ruppe
destructionator at gmail.com
Sat Aug 4 11:35:52 PDT 2012
I think I've cracked the getters...
I opened expression.c in DMD and surfed to line 2940 or so. Looks
like this:
{
error("forward reference to %s", toChars());
return new ErrorExp();
}
return new VarExp(loc, f, hasOverloads);
The function is
Expression *DsymbolExp::semantic(Scope *sc)
Instead of return new VarExp, I made it:
VarExp* varexp = new VarExp(loc, f, hasOverloads);
TypeFunction* tf = (TypeFunction *)f->type;
if(tf->isproperty) {
CallExp* ce = new CallExp(loc, varexp);
ce->semantic(sc);
return ce;
} else {
return varexp;
}
And now my test functions work... the question is, did I break a
lot of other stuff? idk, but this is a big move forward.
More information about the Digitalmars-d
mailing list