Test that Javac does not fail on two methods that differ only by return type

This commit is contained in:
Andrey Breslav
2014-06-16 21:54:40 +04:00
parent b49a203a67
commit 2351c53dce
3 changed files with 22 additions and 0 deletions
@@ -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);
}
}
@@ -0,0 +1,6 @@
package test
class K {
fun foo(l: List<String>): String = ""
fun foo(l: List<Int>): Int = 1
}