21 lines
378 B
Plaintext
Vendored
21 lines
378 B
Plaintext
Vendored
fun test() {
|
|
class Test{
|
|
operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0
|
|
}
|
|
val test = Test()
|
|
test[1, 2, { i ->
|
|
i
|
|
}]
|
|
}
|
|
|
|
fun withSuppression() {
|
|
class Test{
|
|
operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0
|
|
}
|
|
|
|
val test = Test()
|
|
|
|
@Suppress("ReplaceGetOrSet")
|
|
test.get(1, 2) { i -> i }
|
|
}
|