0a8b9c821c
'findKotlinClassOrContent()' does not really distinguish between outer class names and package path components, so it might return 'foo/bar/Baz.Boo' for 'foo/bar/Baz/Boo'. Possibly because 'findKotlinClassOrContent()' potentially returns a raw byte array, ClassId checking is supposed to be performed in 'extractClassMetadata()'. For Java, it happens inside 'FirJavaFacade.findClass()', yet for Kotlin the check was absent.
31 lines
474 B
Kotlin
Vendored
31 lines
474 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// FIR_IDENTICAL
|
|
|
|
// MODULE: lib
|
|
|
|
// FILE: lib.kt
|
|
@file:Suppress("PACKAGE_OR_CLASSIFIER_REDECLARATION")
|
|
package lib
|
|
|
|
class foo {
|
|
class bar {
|
|
fun get(): Int = 1
|
|
}
|
|
}
|
|
|
|
// FILE: lib_foo.kt
|
|
@file:Suppress("PACKAGE_OR_CLASSIFIER_REDECLARATION")
|
|
package lib.foo
|
|
|
|
class bar {
|
|
fun get(): Int = 0
|
|
}
|
|
|
|
// MODULE: main(lib)
|
|
|
|
// FILE: test.kt
|
|
|
|
fun box(): String {
|
|
val obj = lib.foo.bar()
|
|
return if (obj.get() == 0) "OK" else "ERROR"
|
|
} |