[Issue 15478] cases of missed CTFE evaluation when defining arrays dimensions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 26 21:59:20 UTC 2019


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

ag0aep6g <ag0aep6g at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #4 from ag0aep6g <ag0aep6g at gmail.com> ---
Reopening. The original test case still fails, but with a different error:

----
struct Foo(N)
{
    this(N value) { }
    auto bug() { return 0; }
}

void main()
{
    enum Foo!int foo = 0;
    Foo!int[foo.bug] bar; /* Error: need this for bug of type pure nothrow
@nogc @safe int() */

    enum foo_bug = foo.bug;
    Foo!int[foo_bug] baz; // OK
}
----

--


More information about the Digitalmars-d-bugs mailing list