Map RETURN_TYPE_MISMATCH_ON_OVERRIDE to ChangeFunctionReturnTypeFix
This commit is contained in:
committed by
Andrey Breslav
parent
c281796e64
commit
cdd41f0fa1
+2
-2
@@ -1,4 +1,4 @@
|
||||
// "Change return type to 'T'" "true"
|
||||
// "Change 'B.foo' function return type to 'T'" "true"
|
||||
open class S {}
|
||||
open class T : S() {}
|
||||
|
||||
@@ -11,5 +11,5 @@ trait X {
|
||||
}
|
||||
|
||||
abstract class B : A(), X {
|
||||
override abstract fun foo() : T;
|
||||
override abstract fun foo(): T
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// "Change return type to 'Int'" "true"
|
||||
// "Change 'B.foo' function return type to 'Int'" "true"
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
}
|
||||
|
||||
abstract class B : A() {
|
||||
abstract override fun foo() : Int;
|
||||
abstract override fun foo(): Int
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// "Change return type to 'Int'" "true"
|
||||
// "Change 'B.foo' function return type to 'Int'" "true"
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
}
|
||||
|
||||
abstract class B : A() {
|
||||
abstract override fun foo(): Int;
|
||||
abstract override fun foo<caret>(): Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Remove explicitly specified return type to match overridden method" "true"
|
||||
// "Remove explicitly specified return type in 'A.remove' function" "true"
|
||||
abstract class A : java.util.Iterator<Int> {
|
||||
public abstract override fun remove();
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// "Change return type to 'T'" "true"
|
||||
// "Change 'B.foo' function return type to 'T'" "true"
|
||||
open class S {}
|
||||
open class T : S() {}
|
||||
|
||||
@@ -11,5 +11,5 @@ trait X {
|
||||
}
|
||||
|
||||
abstract class B : A(), X {
|
||||
override abstract fun foo() : Int<caret>;
|
||||
override abstract fun foo(): Int<caret>
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
// "Change return type to 'Int'" "false"
|
||||
// "Change return type to 'Long'" "false"
|
||||
// "Remove explicitly specified return type to match overridden method" "false"
|
||||
// "Change 'B.foo' function return type to 'Int'" "false"
|
||||
// "Change 'B.foo' function return type to 'Long'" "false"
|
||||
// "Remove explicitly specified return type in 'B.foo' function" "false"
|
||||
// ERROR: <html>Return type is 'jet.String', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo() : jet.Int <i>defined in</i> A</html>
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
@@ -11,5 +11,5 @@ trait X {
|
||||
}
|
||||
|
||||
abstract class B : A(), X {
|
||||
abstract override fun foo() : String<caret>;
|
||||
abstract override fun foo() : String<caret>
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// "Change return type to 'Int'" "true"
|
||||
// "Change 'B.foo' function return type to 'Int'" "true"
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
}
|
||||
|
||||
abstract class B : A() {
|
||||
abstract override fun foo() : Long<caret>;
|
||||
abstract override fun foo(): Long<caret>
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// "Change return type to 'Int'" "true"
|
||||
// "Change 'B.foo' function return type to 'Int'" "true"
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
}
|
||||
|
||||
abstract class B : A() {
|
||||
abstract override fun foo<caret>();
|
||||
abstract override fun foo<caret>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Remove explicitly specified return type to match overridden method" "true"
|
||||
// "Remove explicitly specified return type in 'A.remove' function" "true"
|
||||
abstract class A : java.util.Iterator<Int> {
|
||||
public abstract override fun remove() : Int<caret>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user