Do not try to load Java classes from incorrect packages
#KT-11474 Fixed
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/javaSrcWrongPackage.kt
|
||||
$TESTDATA_DIR$/javaSrcWrongPackage
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1 @@
|
||||
fun test(): A.Nested = A().nested()
|
||||
@@ -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
|
||||
@@ -0,0 +1,9 @@
|
||||
package foo;
|
||||
|
||||
public class A {
|
||||
public Nested nested() {
|
||||
return new Nested();
|
||||
}
|
||||
|
||||
public static class Nested {}
|
||||
}
|
||||
Reference in New Issue
Block a user