blob: 83712bb4021a1f92ae92b0830e7a27ceb1ec56c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// WITH_STDLIB
abstract class Foo {
abstract fun contains(x: Int);
}
// ERROR: Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly
fun Foo.contains(vararg xs: Int) = xs.forEach(this::contains)
fun box(): String {
object : Foo() {
override fun contains(x: Int) {}
}.contains(1)
return "OK"
}
|