[Issue 12369] New: Defer semantic2 and semantic3 of function local symbols until the end of enclosing function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 14 23:39:16 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12369

           Summary: Defer semantic2 and semantic3 of function local
                    symbols until the end of enclosing function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2014-03-14 23:38:53 PDT ---
Currently this code fails to compile by the forward reference of foo.

auto foo(int) {
    static struct Bar {   // [A]
        void spam() { foo(1); }
    }
    return Bar();
}

Because the semantic2 and 3 of the struct Bar is immediately invoked at the
declaration point [A].

But, essentially it could be compiled, by deferring the semantic2/3 after the
finishing semantic3 of foo.

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


More information about the Digitalmars-d-bugs mailing list