Fixed KT-5211 Code completion in IntelliJ for generating anonymous class creates code with compile error "Projections are not allowed for immediate arguments of a super type"
#KT-5211 Fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
fun registerHandler(handler: Handler<out Message>) {}
|
||||
|
||||
fun test() {
|
||||
registerHandler(<caret>)
|
||||
}
|
||||
|
||||
trait Message
|
||||
|
||||
trait Handler<E> {
|
||||
fun handle(e: E)
|
||||
}
|
||||
|
||||
// ELEMENT: object
|
||||
@@ -0,0 +1,17 @@
|
||||
fun registerHandler(handler: Handler<out Message>) {}
|
||||
|
||||
fun test() {
|
||||
registerHandler(object: Handler<Message> {
|
||||
override fun handle(e: Message) {
|
||||
<caret><selection>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
trait Message
|
||||
|
||||
trait Handler<E> {
|
||||
fun handle(e: E)
|
||||
}
|
||||
|
||||
// ELEMENT: object
|
||||
@@ -10,6 +10,6 @@ fun foo(): KotlinTrait<I1, I2> {
|
||||
// ABSENT: KotlinInheritor3
|
||||
// EXIST: { lookupString: "object", itemText: "object: KotlinInheritor4<I1, I2>(){...}" }
|
||||
// ABSENT: KotlinInheritor5
|
||||
// EXIST: { lookupString: "KotlinInheritor6", itemText: "KotlinInheritor6<I1, out Any?, out I3>", tailText: "() (p)" }
|
||||
// EXIST: { lookupString: "KotlinInheritor6", itemText: "KotlinInheritor6<I1, Any?, I3>", tailText: "() (p)" }
|
||||
// EXIST: { lookupString: "JavaInheritor1", itemText: "JavaInheritor1", tailText: "() (<root>)" }
|
||||
// ABSENT: JavaInheritor2
|
||||
|
||||
Reference in New Issue
Block a user