[KMP] Implement ACTUAL_TYPE_ALIAS_TO_NOTHING/TO_NULLABLE_TYPE errors
^KT-60650 Done
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// 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_TYPE_ALIAS_TO_NOTHING!>actual typealias E01 = Nothing<!>
|
||||
<!ACTUAL_TYPE_ALIAS_NOT_TO_CLASS!>actual typealias E02 = MyNothing<!>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect class E01
|
||||
expect class E02
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
typealias MyNothing = Nothing
|
||||
|
||||
<!ACTUAL_TYPE_ALIAS_TO_NOTHING!>actual typealias E01 = Nothing<!>
|
||||
<!ACTUAL_TYPE_ALIAS_NOT_TO_CLASS!>actual typealias E02 = MyNothing<!>
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// 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_TYPE_ALIAS_TO_NULLABLE_TYPE!>actual typealias E01 = String?<!>
|
||||
<!ACTUAL_TYPE_ALIAS_NOT_TO_CLASS!>actual typealias E02 = MyNullable<!>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expect class E01
|
||||
expect class E02
|
||||
@@ -0,0 +1,4 @@
|
||||
typealias MyNothing = Nothing
|
||||
|
||||
actual typealias E01 = Nothing
|
||||
actual typealias E02 = MyNothing
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/implTypeAlias/actualTypealiasToNothing/jvm.kt:3:1: error: right-hand side of actual type alias cannot be of type kotlin.Nothing
|
||||
actual typealias E01 = Nothing
|
||||
^
|
||||
compiler/testData/multiplatform/implTypeAlias/actualTypealiasToNothing/jvm.kt:4:1: error: right-hand side of actual type alias should be a class, not another type alias
|
||||
actual typealias E02 = MyNothing
|
||||
^
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expect class E01
|
||||
expect class E02
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
typealias MyNullable = String?
|
||||
|
||||
actual typealias E01 = String?
|
||||
actual typealias E02 = MyNullable
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/implTypeAlias/actualTypealiasToNullableType/jvm.kt:3:1: error: right-hand side of actual type alias cannot be a nullable type
|
||||
actual typealias E01 = String?
|
||||
^
|
||||
compiler/testData/multiplatform/implTypeAlias/actualTypealiasToNullableType/jvm.kt:4:1: error: right-hand side of actual type alias should be a class, not another type alias
|
||||
actual typealias E02 = MyNullable
|
||||
^
|
||||
Reference in New Issue
Block a user