[Test] Add test for current behavior of resolution of nested class type

...when it is actualized via typealias.

^KT-31636
This commit is contained in:
Roman Efremov
2023-11-23 12:16:50 +01:00
committed by Space Team
parent 205690b220
commit 5147a5e805
7 changed files with 68 additions and 0 deletions
@@ -0,0 +1,19 @@
// MODULE: m1-common
// FILE: common.kt
expect class Foo {
class Nested
}
fun foo(p: Foo.Nested) {}
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
class FooImpl {
class Nested
}
actual typealias Foo = FooImpl
fun test() {
foo(<!ARGUMENT_TYPE_MISMATCH!>FooImpl.Nested()<!>)
}
@@ -0,0 +1,19 @@
// MODULE: m1-common
// FILE: common.kt
expect class Foo {
class Nested
}
fun foo(p: Foo.<!UNRESOLVED_REFERENCE{JVM}!>Nested<!>) {}
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
class FooImpl {
class Nested
}
actual typealias Foo = FooImpl
fun test() {
foo(FooImpl.Nested())
}