IDEA-127499 Decompiler doesn't support switch over enums
This commit is contained in:
@@ -12,6 +12,8 @@ public class TestSwitchOnEnum {
|
||||
public int testSOE(TimeUnit t) {
|
||||
// This creates anonymous SwitchMap inner class.
|
||||
switch (t) {
|
||||
case MICROSECONDS:
|
||||
return 2;
|
||||
case SECONDS:
|
||||
return 1;
|
||||
}
|
||||
|
||||
13
testData/src/pkg/TestSwitchOnStrings.java
Normal file
13
testData/src/pkg/TestSwitchOnStrings.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package pkg;
|
||||
|
||||
public class TestSwitchOnStrings {
|
||||
public int testSOE(String s) {
|
||||
switch (s) {
|
||||
case "xxx":
|
||||
return 2;
|
||||
case "yyy":
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user