[Issue 21687] Confusing error message for CTFE pointer in static initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 8 10:55:34 UTC 2021


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com
           Severity|enhancement                 |regression

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
This is actually a regression. Version 2.065.0 prints:

Error: Cannot interpret new int at compile time

whereas, starting from 2.066.0:

Error: cannot use non-constant CTFE pointer in an initializer `&[0][0]`

which seems to be a spill from the compiler lowering.

--


More information about the Digitalmars-d-bugs mailing list