[Issue 8704] Invalid nested struct constructions should be detected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 21 08:24:23 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8704


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-09-21 08:25:16 PDT ---
What exact rules does the language define for these function-nested types? It
seems arbitrary that some things are allowed while others are not, for example
this works:

void check(T)()
{
    T t = T.init;
    t.foo();
}

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

    check!S();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list