[Issue 9205] New: Better error message for misplaced pure nothrow tags

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 25 01:53:22 PST 2012


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

           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 at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-12-25 01:52:55 PST ---
void foo(T)(T x) if (is(T == int)) pure nothrow {
}
void main() {
    foo(1);
}



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
constraint

-- 
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