Make completion for overriding functions respect suspend modifier
Fixes #KT-22200
This commit is contained in:
committed by
Alexander Udalov
parent
8bc020f31b
commit
b567817d1f
@@ -5,7 +5,7 @@ interface I {
|
||||
}
|
||||
|
||||
class Base1 {
|
||||
protected open fun bar(){}
|
||||
protected open suspend fun bar(){}
|
||||
}
|
||||
|
||||
open class Base2 : Base1() {
|
||||
@@ -16,7 +16,7 @@ class A : Base2(), I {
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "override", itemText: "override" }
|
||||
// EXIST: { itemText: "override fun bar() {...}", lookupString: "override", allLookupStrings: "bar, override", tailText: null, typeText: "Base1", attributes: "" }
|
||||
// EXIST: { itemText: "override suspend fun bar() {...}", lookupString: "override", allLookupStrings: "bar, override", tailText: null, typeText: "Base1", attributes: "" }
|
||||
// EXIST: { itemText: "override fun equals(other: Any?): Boolean {...}", lookupString: "override", allLookupStrings: "equals, override", tailText: null, typeText: "Any", attributes: "" }
|
||||
// EXIST: { itemText: "override fun foo(p: Int) {...}", lookupString: "override", allLookupStrings: "foo, override", tailText: null, typeText: "I", attributes: "bold" }
|
||||
// EXIST: { itemText: "override fun hashCode(): Int {...}", lookupString: "override", allLookupStrings: "hashCode, override", tailText: null, typeText: "Any", attributes: "" }
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
suspend fun foo()
|
||||
}
|
||||
|
||||
class A : I {
|
||||
o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override suspend fun foo() {...}"
|
||||
@@ -0,0 +1,11 @@
|
||||
interface I {
|
||||
suspend fun foo()
|
||||
}
|
||||
|
||||
class A : I {
|
||||
override suspend fun foo() {
|
||||
<caret><selection>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override suspend fun foo() {...}"
|
||||
Reference in New Issue
Block a user