diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-19 12:53:10 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-08-19 12:53:10 -0700 |
commit | 02cf98d65c798d368fcec43ed64a001d513bdd4f (patch) | |
tree | e39e210ab20917b7e5ffdce14a42f5747506eed0 /java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/IDEA128101.java | |
parent | 2e5965e996aad62ab1338b09d54caaf99ff3dd6a (diff) | |
download | idea-02cf98d65c798d368fcec43ed64a001d513bdd4f.tar.gz |
Snapshot idea/138.1503 from git://git.jetbrains.org/idea/community.git
Change-Id: Ie01af1d8710ec0ff51d90301bda1a18b0b5c0faf
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/IDEA128101.java')
-rw-r--r-- | java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/IDEA128101.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/IDEA128101.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/IDEA128101.java new file mode 100644 index 000000000000..42be49b62f04 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/IDEA128101.java @@ -0,0 +1,29 @@ +class TestIDEA128101 { + + static class Attribute<Y> {}; + static class Path<X> {}; + + static Attribute<Integer> integerAttribute; + static Attribute<String> stringAttribute; + + static <Y> Path<Y> createPath(Attribute<Y> attribute) { + return new Path<>(); + } + static <Y> Path<Y> createPath1(Attribute<Y> attribute) { + return new Path<>(); + } + static <T> void construct(Class<T> aClass, Path<?>... paths) {} + static <T, K> void construct1(Class<T> aClass, Path<K>... paths) {} + static <T, K> void construct2(Class<T> aClass, Path<? extends K>... paths) {} + static <T, K> void construct3(Class<T> aClass, Path<? super K>... paths) {} + static <T, K> void construct4(Class<T> aClass, Path<? super K> path1, Path<? super K> path2) {} + + public static void test() { + 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)); + <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> + } + +} |