KMP: Put "prohbit actual typealias to Nothing and Nullable" under the flag

^KT-61668 Fixed

Review: https://jetbrains.team/p/kt/reviews/12062/timeline
This commit is contained in:
Nikita Bobko
2023-09-05 16:57:16 +02:00
committed by Space Team
parent 141bc9cac9
commit 0922833b46
8 changed files with 98 additions and 14 deletions
@@ -0,0 +1,14 @@
// LANGUAGE: -MultiplatformRestrictions
// MODULE: m1-common
// FILE: common.kt
<!INCOMPATIBLE_MATCHING{JVM}!>expect class E01<!>
<!INCOMPATIBLE_MATCHING{JVM}!>expect class E02<!>
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
typealias MyNothing = Nothing
actual typealias E01 = Nothing
<!ACTUAL_TYPE_ALIAS_NOT_TO_CLASS!>actual typealias E02 = MyNothing<!>
@@ -0,0 +1,14 @@
// LANGUAGE: -MultiplatformRestrictions
// MODULE: m1-common
// FILE: common.kt
expect class E01
expect class E02
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
typealias MyNothing = Nothing
actual typealias E01 = Nothing
<!ACTUAL_TYPE_ALIAS_NOT_TO_CLASS!>actual typealias E02 = MyNothing<!>
@@ -0,0 +1,15 @@
// LANGUAGE: -MultiplatformRestrictions
// FIR_IDENTICAL
// MODULE: m1-common
// FILE: common.kt
expect class E01
expect class E02
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
typealias MyNullable = String?
actual typealias E01 = String?
<!ACTUAL_TYPE_ALIAS_NOT_TO_CLASS!>actual typealias E02 = MyNullable<!>