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

           Summary: template inside function error message
           Product: D
           Version: future
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-06-06 06:53:06 PDT ---
This is wrong D2 program:

void main() {
    template Foo {}
}


DMD v2.046 prints at compile-time:

test.d(2): found 'template' instead of statement
test.d(3): unrecognized declaration


But a better and more readable error message can be:

test.d(2): Error: template definitions aren't allowed inside functions.

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

Reply via email to