www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4946] New: Not good error message with wrongly positioned 'const'

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4946

           Summary: Not good error message with wrongly positioned 'const'
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This seems wrong D2 code:


struct Foo {
    void bar(int x)() if (x > 0) const {}
}
void main() {}


DMD 2.049 prints:
test.d(2): semicolon expected following function declaration

But a better error message is to tell that the position of 'const' is wrong.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 26 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4946




18:05:06 PST ---
*** Issue 6915 has been marked as a duplicate of this issue. ***

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