2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
13 lines
278 B
Kotlin
Vendored
13 lines
278 B
Kotlin
Vendored
|
|
class A {
|
|
operator fun get(x: Int): Int = x
|
|
fun set(x: Int, y: Int) {} // no `operator` modifier
|
|
}
|
|
|
|
fun main() {
|
|
val a = A()
|
|
<!OPERATOR_MODIFIER_REQUIRED!>a[1]<!>++
|
|
a[1] <!UNRESOLVED_REFERENCE!>+=<!> 3
|
|
<!OPERATOR_MODIFIER_REQUIRED!>a[1]<!> = a[1] + 3
|
|
}
|