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

Kenji Hara <[email protected]> changed:

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

--- Comment #4 from Kenji Hara <[email protected]> ---
(In reply to yebblies from comment #3)
> The pull request wasn't merged, but both cases now error.

The opening test case still does not cause front-end errors (no error occur
with -o- switch).

And T t; should also be rejected if T is nested struct. Updated test case is:

void check(T)()
{
    // nested struct constructions outside valid frame scope
    T t0;       // new!
    T t1 = T();
    T t2 = T(1);
}

void main()
{
    struct S
    {
        int n;
        void foo(){}
    }
    check!S();
}

(In reply to Kenji Hara from comment #1)
> https://github.com/D-Programming-Language/dmd/pull/1133

I reopened the pull request to fix this issue perfectly.

--

Reply via email to