new inference: don't add primitive equals bounds

This commit is contained in:
Anna Kozlova
2015-11-24 17:59:57 +01:00
parent 952a9be315
commit fc288cf04d
3 changed files with 8 additions and 6 deletions

View File

@@ -32,6 +32,6 @@ class ReturnTypeCompatibility {
call((String i)->{ return i;});
call(i->{ return i;});
call(i->"");
call(<error descr="no instance(s) of type variable(s) exist so that Integer conforms to int">(int i)->{ return i;}</error>);
call(<error descr="no instance(s) of type variable(s) P exist so that P conforms to int">(int i)->{ return i;}</error>);
}
}

View File

@@ -1,6 +1,6 @@
class IDEA100385 {
void foo(N<Double> n){
n.forEach(<error descr="Incompatible parameter types in lambda expression: expected Double but found double">(double e)</error> -> { });
n.forEach(<error descr="Cannot infer functional interface type">(double e) -> { }</error>);
}
static interface N<E> {
void forEach(Consumer<? extends E> consumer);