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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to