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

David Bennett <davidbenn...@bravevision.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davidbenn...@bravevision.co
                   |                            |m

--- Comment #4 from David Bennett <davidbenn...@bravevision.com> ---
I'm not sure what workaround we would recommend in the deprecation messaged as
the current functionality is actually hard to replicate... as enum and static
would give a different runtime result (actually an error in this case as __ctfe
is not known at statictime... only ctfetime and runtime)

The best I could do on short notice was:

unittest {
    immutable n = __ctfe ? 1 : 2;
    enum l = {return __ctfe ? 1 : 2;}();
    int[l] a;
    assert(a.length == n);
}

--

Reply via email to