https://issues.dlang.org/show_bug.cgi?id=20860

--- Comment #4 from Basile-z <[email protected]> ---
Expression semanticX(DotIdExp exp, Scope* sc)

dmd/expressionsem.d:
---
Expression semanticX(DotIdExp exp, Scope* sc)
{
+    printf("checkpoint %d : %s\n", 0, exp.toChars());
    //printf("DotIdExp::semanticX(this = %p, '%s')\n", this, toChars());
    if (Expression ex = unaSemantic(exp, sc))
        return ex;
+    printf("checkpoint %d : %s\n", 1, exp.toChars());
...
}
---

gives, for the test case:

> checkpoint 0 : A(int(0)).test
> checkpoint 1 : ((A __slA

so unaSemantic corrupts the expression.
`__slA` is a special symbol created in
dmd.expression.StructLiteralExp.addDtorHook().

So that's this method that does a bad rewrite (or maybe even a kind of
corruption)

--

Reply via email to