Create from Usage: Fix choosing superclass for abstract member
This applies to cases when non-existing member is called without explicit receiver #KT-21332 Fixed
This commit is contained in:
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// "Create abstract function 'bar'" "true"
|
||||
// ERROR: Class 'Foo' is not abstract and does not implement abstract base class member public abstract fun bar(): Unit defined in A
|
||||
|
||||
abstract class A
|
||||
|
||||
class Foo : A() {
|
||||
fun foo() {
|
||||
<caret>bar()
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// "Create abstract function 'bar'" "true"
|
||||
// ERROR: Class 'Foo' is not abstract and does not implement abstract base class member public abstract fun bar(): Unit defined in A
|
||||
|
||||
abstract class A {
|
||||
abstract fun bar()
|
||||
}
|
||||
|
||||
class Foo : A() {
|
||||
fun foo() {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create abstract function 'bar'" "true"
|
||||
// ERROR: Class 'Foo' is not abstract and does not implement abstract member public abstract fun bar(): Unit defined in I
|
||||
|
||||
interface I
|
||||
|
||||
class Foo : I {
|
||||
fun foo() {
|
||||
<caret>bar()
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// "Create abstract function 'bar'" "true"
|
||||
// ERROR: Class 'Foo' is not abstract and does not implement abstract member public abstract fun bar(): Unit defined in I
|
||||
|
||||
interface I {
|
||||
fun bar()
|
||||
}
|
||||
|
||||
class Foo : I {
|
||||
fun foo() {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// "Create abstract function 'Foo.bar'" "false"
|
||||
// ACTION: Create function 'bar'
|
||||
// ACTION: Rename reference
|
||||
// ERROR: Unresolved reference: bar
|
||||
|
||||
open class A
|
||||
|
||||
class Foo : A() {
|
||||
fun foo() {
|
||||
<caret>bar()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user