March 24, 2004 duplicate case on string switch is valid | ||||
---|---|---|---|---|
| ||||
Should this be called a compiler overlook? void main() { int i; switch ( i ) { case 1: break; // case 1: break; Case.d(7): duplicate case 1 in switch statement } char[] s; switch ( s ) { case "one": break; case "one": break; // no compiler errors } } Ant |
Copyright © 1999-2021 by the D Language Foundation