Thread overview
[Issue 21554] Invalid assignment expression yields valid type in is(typeof)-expression
Jan 18, 2021
Boris Carvajal
Jan 18, 2021
kinke
Dec 17, 2022
Iain Buclaw
January 18, 2021
https://issues.dlang.org/show_bug.cgi?id=21554

Boris Carvajal <boris2.9@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |boris2.9@gmail.com

--- Comment #1 from Boris Carvajal <boris2.9@gmail.com> ---
Is not this intended? typeof doesn't evaluate the expression. I remember seeing phobos depending on this exact behavior.

class A { int fun(); }

static assert(is(typeof(A.fun()) ==  int));

static assert(!__traits(compiles, A.fun())); // Error: need this for fun of
type int()

--
January 18, 2021
https://issues.dlang.org/show_bug.cgi?id=21554

--- Comment #2 from kinke <kinke@gmx.net> ---
I'm not sure but I very much doubt it. It accounted for a bug in druntime: https://github.com/dlang/druntime/pull/3332

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21554

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--