Initial implementation of KT-5955 Completion for override methods
#KT-5955 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
fun foo(p: Int)
|
||||
}
|
||||
|
||||
class A : I {
|
||||
o<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>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun foo(p: Int) {...}"
|
||||
@@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
val someVal: String?
|
||||
}
|
||||
|
||||
class A : I {
|
||||
o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: String?"
|
||||
@@ -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?"
|
||||
@@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
var someVar: String
|
||||
}
|
||||
|
||||
class A : I {
|
||||
o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override var someVar: String"
|
||||
@@ -0,0 +1,12 @@
|
||||
interface I {
|
||||
var someVar: String
|
||||
}
|
||||
|
||||
class A : I {
|
||||
override var someVar: String
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override var someVar: String"
|
||||
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
@Deprecated("")
|
||||
o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun equals(other: Any?): Boolean {...}"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
@Deprecated("")
|
||||
override fun equals(other: Any?): Boolean {
|
||||
<caret><selection>return super.equals(other)</selection>
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun equals(other: Any?): Boolean {...}"
|
||||
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
@Deprecated("") // it is deprecated
|
||||
public o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun equals(other: Any?): Boolean {...}"
|
||||
+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 fun equals(other: Any?): Boolean {...}"
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun equals(other: Any?): Boolean {...}"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
override fun equals(other: Any?): Boolean {
|
||||
<caret><selection>return super.equals(other)</selection>
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override fun equals(other: Any?): Boolean {...}"
|
||||
@@ -0,0 +1,9 @@
|
||||
open class B {
|
||||
open var someVar: String = ""
|
||||
}
|
||||
|
||||
class A : B {
|
||||
o<caret>
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override var someVar: String"
|
||||
@@ -0,0 +1,12 @@
|
||||
open class B {
|
||||
open var someVar: String = ""
|
||||
}
|
||||
|
||||
class A : B {
|
||||
override var someVar: String
|
||||
get() = <caret><selection>super.someVar</selection>
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override var someVar: String"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
interface I {
|
||||
val someVal: java.io.File?
|
||||
}
|
||||
|
||||
class A(public ov<caret>) : I {
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: File?"
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import java.io.File
|
||||
|
||||
interface I {
|
||||
val someVal: java.io.File?
|
||||
}
|
||||
|
||||
class A(public override val someVal: File?<caret>) : I {
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: File?"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
interface I {
|
||||
val someVal: java.io.File?
|
||||
}
|
||||
|
||||
class A(ov<caret>) : I {
|
||||
}
|
||||
|
||||
// ELEMENT_TEXT: "override val someVal: File?"
|
||||
+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?"
|
||||
Reference in New Issue
Block a user