Fix multiple 'unresolved java classifier' errors

Use the same component (NotFoundClasses) as in loading of compiled Kotlin
symbols.

Some tests were changed to avoid a diagnostic that is now reported when a
non-found class is encountered in a signature (e.g. staticMethod.1.java where
JDK seems to be not configured)

 #KT-10493 Fixed
 #KT-10820 Fixed
 #KT-11368 Fixed
This commit is contained in:
Alexander Udalov
2016-03-17 15:51:25 +03:00
parent 873cf439de
commit e915e1548c
34 changed files with 468 additions and 314 deletions
@@ -0,0 +1,6 @@
package test;
public class A<T> {
public class Inner<X, Y> {
}
}
@@ -0,0 +1,9 @@
package test;
import java.util.List;
public interface B1 {
A<List<String>>.Inner<Integer, Double> produceA();
List<A<String>> produceListOfAs();
}
@@ -0,0 +1,6 @@
package test;
public class A<T, U, V> {
public class Inner<Z> {
}
}
@@ -0,0 +1,10 @@
package test;
import java.util.Collection;
import java.util.List;
public interface B2 {
void consumeA(A<String, Integer, Double>.Inner<Collection<Number>> a);
void consumeListOfAs(List<A<int[], Float, Boolean>> as);
}
@@ -0,0 +1,7 @@
compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyJavaConflictingLibraries/source.kt:4:8: error: cannot access class 'test.A.Inner'. Check your module classpath for missing or conflicting dependencies
b2.consumeA(b1.produceA())
^
compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyJavaConflictingLibraries/source.kt:4:20: error: cannot access class 'test.A.Inner'. Check your module classpath for missing or conflicting dependencies
b2.consumeA(b1.produceA())
^
COMPILATION_ERROR
@@ -0,0 +1,8 @@
import test.*
fun testA(b1: B1, b2: B2) {
b2.consumeA(b1.produceA())
// No error here as in javac
b2.consumeListOfAs(b1.produceListOfAs())
}