[Issue 23273] [REG2.095] Error on passing inout variable to function (not an lvalue)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 31 15:23:48 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23273
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kinke at gmx.net
--- Comment #3 from kinke <kinke at gmx.net> ---
I bet that PR just uncovered another issue, and the relevant questions IMO are:
a) Why is there a cast in the 1st place? When removing the `ref`, the
`-vcg-ast` output reveals a silly
inout pure nothrow @nogc @safe void locate()
{
inout(Cell)* cell = null;
this.getCell(cast(inout(Cell)*)cell);
}
b) Why aren't the 2 types equivalent, where CastExp.isLvalue() would return
true?
https://github.com/dlang/dmd/blob/f282f98f7b8cadd4e37fb95c78d3590756f817e7/src/dmd/expression.d#L5389
--
More information about the Digitalmars-d-bugs
mailing list