Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: X10 2.0.4
-
Fix Version/s: X10 2.3.2
-
Component/s: X10 Compiler: Front-end, X10 Compiler: Front-end Typechecking
-
Labels:None
-
Number of attachments :
Description
The code
public class CaseBug { public static def main(args:Rail[String]!): Void { val aByte = args.length > 0 ? Int.parse(args(0)) : 2; switch(aByte) { case 0 as Byte: Console.OUT.println("A!"); break; default: Console.OUT.println((aByte as Byte)+" not legal."); } switch(aByte as Byte) { case 65: Console.OUT.println("A!"); break; default: Console.OUT.println((aByte as Byte)+" not legal."); } } }
yields error messages:
CaseBug.x10:7: Case label must be an byte, char, short, or int.
CaseBug.x10:10-13: Switch index must be an integer.
Which is it? and if it may be a byte, well... how the byte A?
Bulk defer all non-critical, non-blocker frontend issues to 2.1.0.