fix tests in org.jetbrains.kotlin.idea.quickfix

This commit is contained in:
Michael Nedzelsky
2015-09-04 23:09:17 +03:00
parent 32c66914fe
commit 92ca057b4a
31 changed files with 32 additions and 32 deletions
@@ -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)
@@ -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,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) &rarr; kotlin.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (kotlin.String) &rarr; kotlin.Int <i>defined in</i> A</html>
// ERROR: <html>Return type is '(kotlin.Int) &rarr; kotlin.Int', which is not a subtype of overridden<br/><b>public</b> <b>abstract</b> <b>val</b> x: (kotlin.String) &rarr; kotlin.Int <i>defined in</i> A</html>
interface A {
val x: (String) -> Int
}
@@ -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,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
}
@@ -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,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;
}