Smart completion to use super type for override if no explicit type specified
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
abstract class Base {
|
||||
abstract fun foo(): Int
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
override fun foo() = <caret>
|
||||
}
|
||||
|
||||
fun getInt(): Int = 0
|
||||
fun getString(): String = ""
|
||||
|
||||
// EXIST: getInt
|
||||
// ABSENT: getString
|
||||
@@ -0,0 +1,13 @@
|
||||
abstract class Base {
|
||||
abstract val foo: Int
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
override val foo = <caret>
|
||||
}
|
||||
|
||||
fun getInt(): Int = 0
|
||||
fun getString(): String = ""
|
||||
|
||||
// EXIST: getInt
|
||||
// ABSENT: getString
|
||||
+12
@@ -185,6 +185,18 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImplicitlyTypedOverrideFunBody.kt")
|
||||
public void testImplicitlyTypedOverrideFunBody() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedOverrideFunBody.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImplicitlyTypedOverrideValInitializer.kt")
|
||||
public void testImplicitlyTypedOverrideValInitializer() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedOverrideValInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImplicitlyTypedValInitializer1.kt")
|
||||
public void testImplicitlyTypedValInitializer1() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializer1.kt");
|
||||
|
||||
Reference in New Issue
Block a user