Open srikanth-sankaran opened 3 hours ago
Problem arises in this line:
typeSwitchIndex += caseStatement.constantExpressions.length;
of org.eclipse.jdt.internal.compiler.ast.SwitchStatement.generateCode(BlockScope, CodeStream)
It should be
typeSwitchIndex += caseStatement.peeledLabelExpressions().length;
Found by code inspection:
The program below when compiled and run with javac prints (correctly)
but when compiled with ECJ and runs gets into an infinite loop and goes on printing
Second guard
Goes back to 4.32 when multi pattern case labels came in
Test case: