KT-13298 Suggest names for overridden properties / functions in completion
#KT-13298 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
fun foo(p: Int)
|
||||
}
|
||||
|
||||
class A : I {
|
||||
override fun f<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun foo(p: Int) {...}"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
interface I {
|
||||
fun foo(p: Int)
|
||||
}
|
||||
|
||||
class A : I {
|
||||
override fun foo(p: Int) {
|
||||
<caret><selection>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun foo(p: Int) {...}"
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
@Deprecated("") // it is deprecated
|
||||
public override fun e<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override operator fun equals(other: Any?): Boolean {...}"
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
@Deprecated("") // it is deprecated
|
||||
public override fun equals(other: Any?): Boolean {
|
||||
<caret><selection>return super.equals(other)</selection>
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override operator fun equals(other: Any?): Boolean {...}"
|
||||
@@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
val someVal: String?
|
||||
}
|
||||
|
||||
class A : I {
|
||||
override val <caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: String?"
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
interface I {
|
||||
val someVal: String?
|
||||
}
|
||||
|
||||
class A : I {
|
||||
override val someVal: String?
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: String?"
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
interface I {
|
||||
val someVal: java.io.File?
|
||||
}
|
||||
|
||||
class A(override val s<caret>) : I {
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: File?"
|
||||
idea/idea-completion/testData/handlers/basic/override/AfterValKeywordInConstructorParameter.kt.after
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import java.io.File
|
||||
|
||||
interface I {
|
||||
val someVal: java.io.File?
|
||||
}
|
||||
|
||||
class A(override val someVal: File?<caret>) : I {
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: File?"
|
||||
+1
-1
@@ -4,7 +4,7 @@ interface I {
|
||||
|
||||
class A : I {
|
||||
override fun foo(p: Int) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
<caret><selection>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user