mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
new inference: proceed nested calls of the same method with dependencies between inference variables from different calls (IDEA-136716; IDEA-135286)
This commit is contained in:
+2
-2
@@ -22,8 +22,8 @@ class TestIDEA128101 {
|
||||
construct(String.class, createPath(integerAttribute), createPath(stringAttribute));
|
||||
construct1<error descr="Cannot resolve method 'construct1(java.lang.Class<java.lang.String>, TestIDEA128101.Path<java.lang.Integer>, TestIDEA128101.Path<java.lang.String>)'">(String.class, createPath(integerAttribute), createPath(stringAttribute))</error>;
|
||||
construct2(String.class, createPath(integerAttribute), createPath(stringAttribute));
|
||||
construct3<error descr="Cannot resolve method 'construct3(java.lang.Class<java.lang.String>, TestIDEA128101.Path<java.lang.Integer>, TestIDEA128101.Path<java.lang.String>)'">(String.class, createPath(integerAttribute), createPath(stringAttribute))</error>;
|
||||
construct4(String.class, createPath(integerAttribute), createPath<error descr="'createPath(TestIDEA128101.Attribute<Y>)' in 'TestIDEA128101' cannot be applied to '(TestIDEA128101.Attribute<java.lang.String>)'">(stringAttribute)</error>);
|
||||
<error descr="Type parameter K has incompatible upper bounds: Integer and String">construct3(String.class, createPath(integerAttribute), createPath(stringAttribute));</error>
|
||||
<error descr="Type parameter K has incompatible upper bounds: Integer and String">construct4(String.class, createPath(integerAttribute), createPath(stringAttribute));</error>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
class Test {
|
||||
static {
|
||||
map("Account", map(
|
||||
"Email", map("email", "myemail@domain.com"),
|
||||
"firstname", "momo",
|
||||
"lastname", "this argument makes no difference"
|
||||
),
|
||||
"akey", "makes no difference");
|
||||
|
||||
map("Account", map(
|
||||
"Email", map("email", "myemail@domain.com", "aKey", "commenting out does not help"),
|
||||
"firstname", "momo",
|
||||
"lastname", "this argument makes no difference"
|
||||
),
|
||||
"akey", "makes no difference"
|
||||
);
|
||||
}
|
||||
|
||||
public static <K, V> Map<K, V> map(K key, V value, Object... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <K, V> Map<K, V> map(K key, V value) {
|
||||
return map(key, value, new Object[]{});
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class P<A, B> {
|
||||
static <C, D> P<C, D> create(C c, D d) {
|
||||
return null;
|
||||
}
|
||||
|
||||
P<String, P<Integer, String>> fooBar(String s, String s1) {
|
||||
return create(s, create(1, s1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user