fix tests in org.jetbrains.kotlin.idea.quickfix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// "Change function signature..." "true"
|
||||
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> f(a: kotlin.String): kotlin.Unit <i>defined in</i> A</html>
|
||||
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>public</b> <b>abstract</b> <b>fun</b> f(a: kotlin.String): kotlin.Unit <i>defined in</i> A</html>
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
fun f(a: String)
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
// "Change function signature..." "true"
|
||||
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> f(a: kotlin.String): kotlin.Unit <i>defined in</i> A</html>
|
||||
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>public</b> <b>abstract</b> <b>fun</b> f(a: kotlin.String): kotlin.Unit <i>defined in</i> A</html>
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
fun f(a: String)
|
||||
}
|
||||
|
||||
class B : A {
|
||||
<caret>override fun f(a: Int) {}
|
||||
override fun f(a: Int) {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Change 'A.x' type to '(Int) -> Int'" "false"
|
||||
// ACTION: Change 'C.x' type to '(String) -> Int'
|
||||
// ERROR: <html>Return type is '(kotlin.Int) → kotlin.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (kotlin.String) → kotlin.Int <i>defined in</i> A</html>
|
||||
// ERROR: <html>Return type is '(kotlin.Int) → kotlin.Int', which is not a subtype of overridden<br/><b>public</b> <b>abstract</b> <b>val</b> x: (kotlin.String) → kotlin.Int <i>defined in</i> A</html>
|
||||
interface A {
|
||||
val x: (String) -> Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeVariableTypeFix" "false"
|
||||
// ERROR: <html>Var-property type is 'kotlin.String', which is not a type of overridden<br/><b>internal</b> <b>abstract</b> <b>var</b> x: kotlin.Int <i>defined in</i> A</html>
|
||||
// ERROR: <html>Var-property type is 'kotlin.String', which is not a type of overridden<br/><b>public</b> <b>abstract</b> <b>var</b> x: kotlin.Int <i>defined in</i> A</html>
|
||||
interface A {
|
||||
var x: Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeVariableTypeFix" "false"
|
||||
// ERROR: <html>Var-property type is 'kotlin.Int', which is not a type of overridden<br/><b>internal</b> <b>abstract</b> <b>var</b> x: kotlin.String <i>defined in</i> A</html>
|
||||
// ERROR: <html>Var-property type is 'kotlin.Int', which is not a type of overridden<br/><b>public</b> <b>abstract</b> <b>var</b> x: kotlin.String <i>defined in</i> A</html>
|
||||
interface A {
|
||||
var x: String
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeFunctionReturnTypeFix" "false"
|
||||
// ERROR: <html>Return type is 'kotlin.Long', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Int <i>defined in</i> A</html>
|
||||
// ERROR: <html>Return type is 'kotlin.Long', which is not a subtype of overridden<br/><b>public</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Int <i>defined in</i> A</html>
|
||||
interface A {
|
||||
fun foo(): Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Change 'B.foo' function return type to 'Int'" "false"
|
||||
// "Change 'B.foo' function return type to 'Long'" "false"
|
||||
// "Remove explicitly specified return type" "false"
|
||||
// ERROR: <html>Return type is 'kotlin.String', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Int <i>defined in</i> A</html>
|
||||
// ERROR: <html>Return type is 'kotlin.String', which is not a subtype of overridden<br/><b>public</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Int <i>defined in</i> A</html>
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user