Do not try to load Java classes from incorrect packages

#KT-11474 Fixed
This commit is contained in:
Alexander Udalov
2017-05-16 14:23:33 +03:00
parent 52237ce77f
commit bfb3b38ebc
6 changed files with 32 additions and 7 deletions
+4
View File
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/javaSrcWrongPackage.kt
$TESTDATA_DIR$/javaSrcWrongPackage
-d
$TEMP_DIR$
+1
View File
@@ -0,0 +1 @@
fun test(): A.Nested = A().nested()
+7
View File
@@ -0,0 +1,7 @@
compiler/testData/cli/jvm/javaSrcWrongPackage.kt:1:13: error: unresolved reference: A
fun test(): A.Nested = A().nested()
^
compiler/testData/cli/jvm/javaSrcWrongPackage.kt:1:24: error: unresolved reference: A
fun test(): A.Nested = A().nested()
^
COMPILATION_ERROR
+9
View File
@@ -0,0 +1,9 @@
package foo;
public class A {
public Nested nested() {
return new Nested();
}
public static class Nested {}
}