[Issue 14269] Enum is not implicitly converted to base type when using ref

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Mar 10 11:04:03 PDT 2015


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

Ali Cehreli <acehreli at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |acehreli at yahoo.com

--- Comment #13 from Ali Cehreli <acehreli at yahoo.com> ---
If the implicitly-converted value is an rvalue (as it is), where is it stored
to take the reference of? Since it is not possible to take the address of an
rvalue simply because it may be sitting in a register, I can't see how this
"fix" can be reverted without special-casing the compiler. What kinds of
rvalues should we start taking references of?

It is unfortunate that this breaks compilation of wrong code but I think the
extent of code change should be minimal. Anyway, 2.066.1 is still available. :)

Ali

--


More information about the Digitalmars-d-bugs mailing list