[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:
committed by
Space Team
parent
5c7b586dbb
commit
445ed7abc9
+5
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user