[Issue 19774] wrong code caused by opIndex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 8 14:05:55 UTC 2019


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

Mihails Strasuns <mihails.strasuns at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mihails.strasuns at gmail.com

--- Comment #5 from Mihails Strasuns <mihails.strasuns at gmail.com> ---
Quick check with -vcg-ast shows that for opIndex different intermediate AST
gets generated compared to regular function call:

C foo()
{
        C __dop3 = bar();
        return __dop3.opIndex(1);
}

vs

C foo()
{
        return ((C __tmpfordtor3 = bar();) , __tmpfordtor3).zzz();
}

--


More information about the Digitalmars-d-bugs mailing list