new inference: initial tests

This commit is contained in:
Anna Kozlova
2013-09-20 12:11:57 +04:00
parent 970a180902
commit 935cdbaf3b
229 changed files with 7713 additions and 1 deletions
@@ -0,0 +1,38 @@
import java.util.*;
interface Base {
}
class Derived implements Base {
}
class X {
void method(int i, Base b) { }
void method(int i, Derived b) { }
{
Derived d = new Derived();
method(10, d);
}
}
class Temp<T> {}
class A {
<error descr="'A(T)' clashes with 'A(T)'; both methods have same erasure">public <T extends Temp<String>> A(T list)</error> {}
public <T extends Temp<Integer>> A(T list) {}
}
class B {
public <T extends A> B(T list) {}
public <T extends Temp<Integer>> B(T list) {}
}
//////////////////////////////////////////
class IdeaBug {
static <T> T cloneMe(T arg) throws CloneNotSupportedException {
return (T) arg.<error descr="'clone()' has protected access in 'java.lang.Object'">clone</error>();
}
}