mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
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
14 lines
379 B
Java
14 lines
379 B
Java
import java.io.Serializable;
|
|
|
|
abstract class Test {
|
|
|
|
abstract <T> T test(Class<T> cls);
|
|
|
|
abstract <T> T test(Serializable type);
|
|
|
|
private void call(){
|
|
String s = <error descr="Incompatible types. Required String but 'test' was inferred to T:
|
|
no instance(s) of type variable(s) exist so that String[] conforms to String">test(String[].class);</error>
|
|
}
|
|
}
|