D - duplicate case on string switch is valid
- Ant (19/19) Mar 23 2004 Should this be called a compiler overlook?
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
Mar 23 2004