[FE] Properly report diagnostics about type arguments of implicit invoke

#KT-40396 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-12-16 16:10:40 +03:00
committed by TeamCityServer
parent 329066a4f3
commit 44948aa9a2
8 changed files with 64 additions and 10 deletions
@@ -0,0 +1,13 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// ISSUE: KT-40396
val <C> C.foo get() = Foo<C>()
class Foo<K> {
operator fun <T> invoke(body: () -> Unit) {}
}
class Bar {
val bar = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!> {}
val baz = <!TYPE_ARGUMENTS_NOT_ALLOWED!>foo<!><Int> {}
}