Test that Javac does not fail on two methods that differ only by return type
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ClashingSignaturesWithoutReturnType {
|
||||
void test(List<String> ls, List<Integer> li) {
|
||||
K k = new K();
|
||||
k.foo(ls);
|
||||
k.foo(li);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
class K {
|
||||
fun foo(l: List<String>): String = ""
|
||||
fun foo(l: List<Int>): Int = 1
|
||||
}
|
||||
Reference in New Issue
Block a user