[FE] Properly report diagnostics about type arguments of implicit invoke
#KT-40396 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
329066a4f3
commit
44948aa9a2
@@ -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 = foo {}
|
||||
val baz = foo<Int> {}
|
||||
}
|
||||
@@ -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> {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public val </*0*/ C> C.foo: Foo<C>
|
||||
|
||||
public final class Bar {
|
||||
public constructor Bar()
|
||||
public final val bar: kotlin.Unit
|
||||
public final val baz: kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Foo</*0*/ K> {
|
||||
public constructor Foo</*0*/ K>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final operator fun </*0*/ T> invoke(/*0*/ body: () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user