mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
calc types by applicability constraints if inference fails
include all inference variables for resolve and ignore additional constraints checks if the inference is going to failure; this way if (expr()) would get type of the 'standalone' expression instead of expression with boolean as expected type
This commit is contained in:
@@ -7,10 +7,7 @@ class Test {
|
||||
final Class<? extends ClassB> bClass = null;
|
||||
ClassB b = factory.create(bClass);
|
||||
String str = <error descr="Incompatible types. Required String but 'create' was inferred to T:
|
||||
no instance(s) of type variable(s) exist so that capture of ? extends ClassB conforms to String
|
||||
inference variable T has incompatible bounds:
|
||||
equality constraints: capture of ? extends ClassB
|
||||
upper bounds: ClassA<I>, Object, String">factory.create(bClass);</error>
|
||||
no instance(s) of type variable(s) exist so that capture of ? extends ClassB conforms to String">factory.create(bClass);</error>
|
||||
}
|
||||
|
||||
public static class Factory {
|
||||
|
||||
Reference in New Issue
Block a user