[Issue 3773] New: Incorrectly returning an enum error points turns enum line iso error line

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 5 15:48:16 PST 2010


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

           Summary: Incorrectly returning an enum error points turns enum
                    line iso error line
           Product: D
           Version: 0.155
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: strtr at despam.it


--- Comment #0 from strtr at despam.it 2010-02-05 15:48:14 PST ---
--
1 module test;
2 enum { A = 0, B, C }
3 enum E { A = 0, B, C }
4 void func1(){
5     return A;}
6 void func2(){
7     return E.A;}
8 void func3(){
9      return 0;}
--

test.d(2): Error: long has no effect in expression (0)
// should point to line 5, very annoying to find this kind of bug!

test.d(7): Error: long has no effect in expression (cast(E)0)
// correct line but still incomprehensible

test.d(9): Error: long has no effect in expression (0)
// correct line but say what?

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