Fixed availability of "Make abstract" and "Implement members" quickfixes

This commit is contained in:
Valentin Kipyatkov
2015-10-17 12:38:48 +03:00
parent fc10fa66be
commit 963a8992b1
12 changed files with 119 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
// "Make 'A' abstract" "false"
// ERROR: <html>Class 'X' must override <b>public</b> <b>open</b> <b>fun</b> foo(): kotlin.Unit <i>defined in</i> X<br />because it inherits many implementations of it</html>
// ACTION: Create Test
// ACTION: Make internal
// ACTION: Make private
// ACTION: Move 'X' to separate file
interface D {
fun foo()
}
interface E {
fun foo() {}
}
object Impl : D, E {
override fun foo() {}
}
<caret>class X : D by Impl, E by Impl {}
@@ -0,0 +1,7 @@
// "Make 'A' abstract" "true"
interface I {
fun foo()
}
<caret>class A : I {
}
@@ -0,0 +1,7 @@
// "Make 'A' abstract" "true"
interface I {
fun foo()
}
abstract class A : I {
}
@@ -0,0 +1,7 @@
// "Make 'B' abstract" "true"
abstract class A {
abstract fun foo()
}
<caret>class B : A() {
}
@@ -0,0 +1,7 @@
// "Make 'B' abstract" "true"
abstract class A {
abstract fun foo()
}
abstract class B : A() {
}
+6
View File
@@ -0,0 +1,6 @@
// "Implement members" "true"
interface I {
fun foo()
}
<caret>class A : I
@@ -0,0 +1,10 @@
// "Implement members" "true"
interface I {
fun foo()
}
class A : I {
override fun foo() {
<caret><selection>throw UnsupportedOperationException()</selection>
}
}
@@ -0,0 +1,7 @@
// "Implement members" "true"
abstract class A {
abstract fun foo()
}
<caret>class B : A() {
}
@@ -0,0 +1,10 @@
// "Implement members" "true"
abstract class A {
abstract fun foo()
}
class B : A() {
override fun foo() {
throw UnsupportedOperationException()
}
}