[K2] Violation of OPT_IN_USAGE_ERROR non-propagating opt-in rules for typealias
^KT-62451
This commit is contained in:
committed by
Space Team
parent
6d446abe12
commit
4c9ad970ff
@@ -64,12 +64,16 @@ class B : I
|
||||
@OptIn(Marker::class)
|
||||
typealias MyList = ArrayList<I>
|
||||
|
||||
@Marker
|
||||
typealias AList = ArrayList<I>
|
||||
|
||||
@Marker
|
||||
typealias YourList = ArrayList<String>
|
||||
|
||||
fun main() {
|
||||
val x = <!OPT_IN_USAGE_ERROR!>listOf<!>(A(), B())
|
||||
val y = <!OPT_IN_USAGE_ERROR!>MyList<!>()
|
||||
val b = <!OPT_IN_USAGE_ERROR!>AList<!>()
|
||||
val z = <!OPT_IN_USAGE_ERROR!>YourList<!>()
|
||||
<!OPT_IN_USAGE_ERROR!>YourList<!>().add("")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user