www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9205] New: Better error message for misplaced pure nothrow tags


           Summary: Better error message for misplaced pure nothrow tags
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

void foo(T)(T x) if (is(T == int)) pure nothrow {
void main() {

Gives in DMD 2.061alpha:

test.d(1): Error: semicolon expected following function declaration

But I'd like that code to compile, or to give a simpler to understand error
message, something like:

test.d(1): Error: 'pure nothrow' attributes of 'foo' must precede template

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