[K2] Disappeared OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN (1)

Added error propagation for the type-aliased type.

^KT-59998
This commit is contained in:
Anastasia.Nekrasova
2023-10-31 11:29:21 +02:00
committed by Space Team
parent 5c7b586dbb
commit 445ed7abc9
8 changed files with 53 additions and 18 deletions
@@ -32,7 +32,7 @@ fun useDataClass(d: DataClass) {
typealias My = <!OPT_IN_USAGE_ERROR!>Some<!>
fun my(my: My) {}
fun my(my: <!OPT_IN_USAGE_ERROR!>My<!>) {}
fun your(my: <!OPT_IN_USAGE_ERROR!>Some<!>) {}
@@ -70,6 +70,10 @@ typealias AList = ArrayList<I>
@Marker
typealias YourList = ArrayList<String>
fun my2(my: MyList) {}
fun my3(my: <!OPT_IN_USAGE_ERROR!>YourList<!>) {}
fun main() {
val x = <!OPT_IN_USAGE_ERROR!>listOf<!>(A(), B())
val y = MyList()