abstract class C { abstract fun f(a: A) } fun f() { class R object : C() { override fun f(a: R) { TODO("Not yet implemented") } } }