1 /*
   2  * @test  /nodynamiccopyright/
   3  * @bug 6827009
   4  * @summary Check for non-constant case labels.
   5  * @compile/fail/ref=NonConstantLabel.out -XDrawDiagnostics NonConstantLabel.java
   6  */
   7 class NonConstantLabel {
   8     String m(String s) {
   9         String fauxConstant = "Goodbye Cruel World";
  10         switch(s) {
  11         case "Hello World":
  12             return(s);
  13         case fauxConstant:
  14             return (s + s);
  15         }
  16     }
  17 }