inference: allow child session inference if containing method is not generics

This commit is contained in:
Anna.Kozlova
2018-10-19 14:46:04 +02:00
parent 11fd315bc5
commit 9aa64b30d9
7 changed files with 30 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ import java.util.function.Function;
class Test {
{
valueOf(processFirst(x -> <error descr="Bad return type in lambda expression: Integer cannot be converted to V">x</error>));
valueOf(processFirst(<error descr="no instance(s) of type variable(s) exist so that Integer conforms to char[]">x -> x</error>));
}
public static <V> V processFirst(Function<Integer,V> f){

View File

@@ -6,7 +6,7 @@ import java.util.stream.Stream;
class Test {
void foo() {
log(get(<error descr="Bad return type in method reference: cannot convert java.util.TreeSet<java.lang.String> to C">TreeSet<String>::new</error>));
log(<error descr="no instance(s) of type variable(s) exist so that TreeSet<String> conforms to String[]">get(TreeSet<String>::new)</error>);
}
private void log(String params[]) {