IDEA-93853 Make: no error if parameterized type capture bound is incompatible to declared bound

This commit is contained in:
Eugene Zhuravlev
2012-11-03 18:48:09 +01:00
parent f8d73f78a1
commit f7f602ea13
22 changed files with 249 additions and 92 deletions
@@ -0,0 +1,16 @@
Cleaning output files:
out/production/ArgumentContainment/Sub2.class
End of files
Compiling files:
src/Sub2.java
End of files
Cleaning output files:
out/production/ArgumentContainment/CaptureCreator.class
out/production/ArgumentContainment/CaptureCreator2.class
out/production/ArgumentContainment/GenericBound.class
End of files
Compiling files:
src/CaptureCreator.java
src/CaptureCreator2.java
src/GenericBound.java
End of files
@@ -0,0 +1,2 @@
public class Sub2 {
}
@@ -0,0 +1,4 @@
public class CaptureCreator {
public void context(GenericBound<? extends Parent> p) {
}
}
@@ -0,0 +1,4 @@
public class CaptureCreator2 {
public void context(GenericBound<? extends Sub> p) {
}
}
@@ -0,0 +1,2 @@
public class GenericBound<T extends Sub2> {
}
@@ -0,0 +1,2 @@
public class Parent {
}
@@ -0,0 +1,2 @@
public class Sub extends Parent {
}
@@ -0,0 +1,2 @@
public class Sub2 extends Sub {
}
@@ -0,0 +1,18 @@
Cleaning output files:
out/production/ArgumentContainment2/Sub.class
End of files
Compiling files:
src/Sub.java
End of files
Cleaning output files:
out/production/ArgumentContainment2/CaptureCreator.class
out/production/ArgumentContainment2/CaptureCreator2.class
out/production/ArgumentContainment2/GenericBound.class
out/production/ArgumentContainment2/Sub2.class
End of files
Compiling files:
src/CaptureCreator.java
src/CaptureCreator2.java
src/GenericBound.java
src/Sub2.java
End of files
@@ -0,0 +1,2 @@
public class Sub {
}
@@ -0,0 +1,4 @@
public class CaptureCreator {
public void context(GenericBound<? super Sub> p) {
}
}
@@ -0,0 +1,4 @@
public class CaptureCreator2 {
public void context(GenericBound<? super Sub2> p) {
}
}
@@ -0,0 +1,2 @@
public class GenericBound<T extends Parent> {
}
@@ -0,0 +1,2 @@
public class Parent {
}
@@ -0,0 +1,2 @@
public class Sub extends Parent {
}
@@ -0,0 +1,2 @@
public class Sub2 extends Sub{
}