You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
405 B
17 lines
405 B
10 years ago
|
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");
|
||
|
}
|
||
|
}
|