aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 6827009 aoqi@0: * @summary Check for case lables of different types. aoqi@0: * @compile/fail -source 6 BadlyTypedLabel2.java aoqi@0: * @compile/fail/ref=BadlyTypedLabel2.out -XDrawDiagnostics BadlyTypedLabel2.java aoqi@0: */ aoqi@0: import static java.math.RoundingMode.*; aoqi@0: aoqi@0: class BadlyTypedLabel2 { aoqi@0: String m(String s) { aoqi@0: switch(s) { aoqi@0: case "Oh what a feeling...": aoqi@0: return(s); aoqi@0: case CEILING: aoqi@0: return ("... switching on the ceiling!"); aoqi@0: } aoqi@0: } aoqi@0: }