[KMP] Implement ACTUAL_TYPE_ALIAS_TO_NOTHING/TO_NULLABLE_TYPE errors
^KT-60650 Done
This commit is contained in:
+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