Any AST experts n da house?
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Nov 17 06:10:01 PST 2016
Lucia is working on https://issues.dlang.org/show_bug.cgi?id=16683 which
shows good promise in cleaning the cobwebs around Typeinfo. She looked
into matters and figured she needs to have TypeidExp.semantic() return
the lowered expression. In the code below
getFuncTemplateDecl(tidSymbol); // returns nil
and the compiler crashes when it hits this line.
// extern (C++) final class TypeidExp : Expression @ dmd-> expression.d
override Expression semantic(Scope* sc)
{
auto tidIdentifierExp = new IdentifierExp(loc, new
Identifier("__typeidImplT"));
auto tidSymbol = new Dsymbol(new Identifier("__typeidImplT"));
auto tidDeclaration = getFuncTemplateDecl(tidSymbol);
auto tidExp = new TemplateExp(loc, tidDeclaration);
auto callExp = new CallExp(loc, tidExp);
return callExp;
}
Any help would be appreciated.
Thanks,
Andrei
More information about the Digitalmars-d
mailing list