mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
new inference: cleanup
This commit is contained in:
-12
@@ -110,18 +110,6 @@ public class InferenceIncorporationPhase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//todo no such a rule in spec?!
|
||||
for (PsiType lowerBound : lowerBounds) {
|
||||
if (mySession.isProperType(lowerBound)) {
|
||||
final PsiSubstitutor substitutor = PsiSubstitutor.EMPTY.put(inferenceVariable.getParameter(), lowerBound);
|
||||
for (PsiType upperBound : upperBounds) {
|
||||
if (!mySession.isProperType(upperBound)) {
|
||||
addConstraint(new StrictSubtypingConstraint(substitutor.substitute(upperBound), lowerBound));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Pair<PsiTypeParameter[], PsiClassType> capture : myCaptures) {
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ class A<T> {
|
||||
<T extends A<T>> void foo(T x){}
|
||||
|
||||
void bar(A<?> x){
|
||||
<error descr="Inferred type 'A<capture<?>>' for type parameter 'T' is not within its bound; should extend 'A<A<capture<?>>>'">foo(x)</error>;
|
||||
<error descr="Inferred type 'capture<?>' for type parameter 'T' is not within its bound; should extend 'A<capture<? extends A<capture<?>>>>'">foo(x)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user