Summary: Refuse wrong final switch
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-05-26 15:56:47 PDT ---
This program compiles and runs with no errors:

void main(string[] args) {
    final switch (args.length) {
        case 0: break;

But in such cases I suggest the compiler to statically refuse this code, and
give an error.

See also bug 5713 and bug 5714

Note this bug is different from 5713 because in 5713 I don't like an error
message (and I'd like the compiler to enforce the presence of the cases for
0,1, and 2), while in this case I'd like an error message.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to