java-decompiler: extra casts on method calls omitted
(loosely based on https://github.com/JetBrains/intellij-community/pull/217)
This commit is contained in:
BIN
testData/classes/pkg/TestAmbiguousCall.class
Normal file
BIN
testData/classes/pkg/TestAmbiguousCall.class
Normal file
Binary file not shown.
BIN
testData/classes/pkg/TestAmbiguousCallWithDebugInfo.class
Normal file
BIN
testData/classes/pkg/TestAmbiguousCallWithDebugInfo.class
Normal file
Binary file not shown.
18
testData/results/TestAmbiguousCall.dec
Normal file
18
testData/results/TestAmbiguousCall.dec
Normal file
@@ -0,0 +1,18 @@
|
||||
package pkg;
|
||||
|
||||
class TestAmbiguousCall {
|
||||
void m1(RuntimeException var1, String var2) {
|
||||
}
|
||||
|
||||
void m1(IllegalArgumentException var1, String var2) {
|
||||
}
|
||||
|
||||
void test() {
|
||||
IllegalArgumentException var1 = new IllegalArgumentException();
|
||||
this.m1((RuntimeException)var1, "RE");
|
||||
this.m1(var1, "IAE");
|
||||
IllegalArgumentException var2 = new IllegalArgumentException();
|
||||
this.m1((RuntimeException)var2, "RE");
|
||||
this.m1((IllegalArgumentException)var2, "IAE");
|
||||
}
|
||||
}
|
||||
18
testData/results/TestAmbiguousCallWithDebugInfo.dec
Normal file
18
testData/results/TestAmbiguousCallWithDebugInfo.dec
Normal file
@@ -0,0 +1,18 @@
|
||||
package pkg;
|
||||
|
||||
class TestAmbiguousCall {
|
||||
void m1(RuntimeException e, String s) {
|
||||
}
|
||||
|
||||
void m1(IllegalArgumentException e, String s) {
|
||||
}
|
||||
|
||||
void test() {
|
||||
IllegalArgumentException iae = new IllegalArgumentException();
|
||||
this.m1((RuntimeException)iae, "RE");
|
||||
this.m1(iae, "IAE");
|
||||
IllegalArgumentException re = new IllegalArgumentException();
|
||||
this.m1((RuntimeException)re, "RE");
|
||||
this.m1((IllegalArgumentException)re, "IAE");
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public enum TestEnum {
|
||||
}
|
||||
|
||||
private TestEnum() {
|
||||
this((String)"?");
|
||||
this("?");
|
||||
}
|
||||
|
||||
private TestEnum(@Deprecated String var3) {
|
||||
|
||||
16
testData/src/pkg/TestAmbiguousCall.java
Normal file
16
testData/src/pkg/TestAmbiguousCall.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package pkg;
|
||||
|
||||
class TestAmbiguousCall {
|
||||
void m1(RuntimeException e, String s) { }
|
||||
void m1(IllegalArgumentException e, String s) { }
|
||||
|
||||
void test() {
|
||||
IllegalArgumentException iae = new IllegalArgumentException();
|
||||
m1((RuntimeException)iae, "RE");
|
||||
m1(iae, "IAE");
|
||||
|
||||
RuntimeException re = new IllegalArgumentException();
|
||||
m1(re, "RE");
|
||||
m1((IllegalArgumentException)re, "IAE");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user