mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
21 lines
336 B
Kotlin
21 lines
336 B
Kotlin
// PROBLEM: none
|
|
// WITH_STDLIB
|
|
// COMPILER_ARGUMENTS: -Xopt-in=kotlin.RequiresOptIn
|
|
|
|
@RequiresOptIn
|
|
annotation class Marker
|
|
|
|
class Foo() {
|
|
val bar = Array<Int>(5) { 0 }
|
|
|
|
@Marker
|
|
operator fun set(index: Int, value: Int) {
|
|
bar[index] = value
|
|
}
|
|
}
|
|
|
|
@OptIn(<caret>Marker::class)
|
|
fun baz(foo: Foo) {
|
|
foo[2] = 1
|
|
}
|