1 /** 2 * @test /nodynamiccopyright/ 3 * @bug 8206986 4 * @compile/fail/ref=SwitchNoExtraTypes.out -XDrawDiagnostics SwitchNoExtraTypes.java 5 */ 6 7 public class SwitchNoExtraTypes { 8 9 private void switchBoolean(boolean b) { 10 switch (b) { 11 case true: return ; 12 } 13 } 14 15 private void switchLong(long l) { 16 switch (l) { 17 case 0: return ; 18 } 19 } 20 21 private void switchFloat(float f) { 22 switch (f) { 23 case 0: return ; 24 } 25 } 26 27 private void switchDouble(double d) { 28 switch (d) { 29 case 0: return ; 30 } 31 } 32 33 }