Type arguments of a raw method (IDEA-57277)

This commit is contained in:
anna
2013-05-08 11:44:11 +02:00
parent f272e773ee
commit 6065034a21
4 changed files with 109 additions and 0 deletions
@@ -0,0 +1,43 @@
interface I{
<T extends Iterable<String>> void foo();
}
abstract class A<S> implements I {
public abstract <T extends Iterable<String>> void foo();
<T extends A> void bar(T x){
A a = null;
a.<Iterable<String>> foo();
x.<Iterable<String>> foo();
}
}
abstract class B<S> {
public abstract <T extends Iterable<String>> void foo();
<T extends B> void bar(T x){
B a = null;
a.<error descr="Type arguments given on a raw method"><Iterable<String>></error> foo();
x.<error descr="Type arguments given on a raw method"><Iterable<String>></error> foo();
}
}
abstract class C<S> {
public abstract <T extends Iterable<String>> void foo();
<T extends C & I> void bar(T x){
x.<Iterable<String>> foo();
}
}
//---------------------------------------------------------------
interface I1 {
void foo();
}
abstract class B1<S> {
public abstract <T extends Iterable<String>> void foo();
<T extends B1 & I1> void bar(T x){
B1 a = null;
a.<error descr="Type arguments given on a raw method"><Iterable<String>></error> foo();
x.<error descr="Type arguments given on a raw method"><Iterable<String>></error> foo();
}
}
@@ -0,0 +1,43 @@
interface I{
<T extends Iterable<String>> void foo();
}
abstract class A<S> implements I {
public abstract <T extends Iterable<String>> void foo();
<T extends A> void bar(T x){
A a = null;
a.<Iterable<String>> foo();
x.<Iterable<String>> foo();
}
}
abstract class B<S> {
public abstract <T extends Iterable<String>> void foo();
<T extends B> void bar(T x){
B a = null;
a.<error descr="Type arguments given on a raw method"><Iterable<String>></error> foo();
x.<Iterable<String>> foo();
}
}
abstract class C<S> {
public abstract <T extends Iterable<String>> void foo();
<T extends C & I> void bar(T x){
x.<Iterable<String>> foo();
}
}
//---------------------------------------------------------------
interface I1 {
void foo();
}
abstract class B1<S> {
public abstract <T extends Iterable<String>> void foo();
<T extends B1 & I1> void bar(T x){
B1 a = null;
a.<error descr="Type arguments given on a raw method"><Iterable<String>></error> foo();
x.<Iterable<String>> foo();
}
}