Community
Participate
Working Groups
The following code snippets will yield dead code: if (a instanceof CharSequence) { } else if (a instanceof String) { } switch(a) { CharSequence: a String: a } try { } catch(Exception e) { } catch(IOException e) { }
We should check that case with constant expression are duplicated. For example: val y = 2 val z = 2 switch x : 1 { case 1 + y: true case 1 + z: false } Here cases are duplicated and it will cause errors in generated java code.
Pushed to review: https://git.eclipse.org/r/20495 - added duplicate cases check
pushed to review: https://git.eclipse.org/r/20767
Requested via bug 522520. -M.