fix tests in org.jetbrains.kotlin.idea.quickfix
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Make 'object : T {}' abstract" "false"
|
||||
// ACTION: Implement members
|
||||
// ACTION: Split property declaration
|
||||
// ERROR: <html>Object must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Unit <i>defined in</i> T</html>
|
||||
// ERROR: <html>Object must be declared abstract or implement abstract member<br/><b>public</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Unit <i>defined in</i> T</html>
|
||||
interface T {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>internal</b> <b>fun</b> kotlin.String.minus(i: java.lang.Integer): kotlin.String <i>defined in</i> h</li><li><b>internal</b> <b>fun</b> kotlin.String.minus(str: kotlin.String): kotlin.String <i>defined in</i> h</li></ul></html>
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> <b>fun</b> kotlin.String.minus(i: java.lang.Integer): kotlin.String <i>defined in</i> h</li><li><b>public</b> <b>fun</b> kotlin.String.minus(str: kotlin.String): kotlin.String <i>defined in</i> h</li></ul></html>
|
||||
|
||||
package h
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>internal</b> <b>fun</b> kotlin.String.minus(i: java.lang.Integer): kotlin.String <i>defined in</i> h</li><li><b>internal</b> <b>fun</b> kotlin.String.minus(str: kotlin.String): kotlin.String <i>defined in</i> h</li></ul></html>
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> <b>fun</b> kotlin.String.minus(i: java.lang.Integer): kotlin.String <i>defined in</i> h</li><li><b>public</b> <b>fun</b> kotlin.String.minus(str: kotlin.String): kotlin.String <i>defined in</i> h</li></ul></html>
|
||||
|
||||
package h
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>internal</b> <b>fun</b> h.A.plus(): kotlin.Int <i>defined in</i> h</li><li><b>public</b> <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> <b>fun</b> h.A.plus(): kotlin.Int <i>defined in</i> h</li><li><b>public</b> <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
|
||||
package h
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>internal</b> <b>fun</b> h.A.plus(): kotlin.Int <i>defined in</i> h</li><li><b>public</b> <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> <b>fun</b> h.A.plus(): kotlin.Int <i>defined in</i> h</li><li><b>public</b> <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
|
||||
package h
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Add parameter to function 'foo'" "true"
|
||||
// ERROR: Too many arguments for internal fun foo(): kotlin.Unit defined in b
|
||||
// ERROR: Too many arguments for public fun foo(): kotlin.Unit defined in b
|
||||
package a
|
||||
|
||||
import b.foo
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Add parameter to function 'foo'" "true"
|
||||
// ERROR: Too many arguments for internal fun foo(): kotlin.Unit defined in b
|
||||
// ERROR: Too many arguments for public fun foo(): kotlin.Unit defined in b
|
||||
package a
|
||||
|
||||
import b.foo
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddFunctionParametersFix" "false"
|
||||
//ERROR: Too many arguments for internal final fun component1(): kotlin.Int defined in Data
|
||||
//ERROR: Too many arguments for public final fun component1(): kotlin.Int defined in Data
|
||||
|
||||
data class Data(val i: Int) {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddFunctionParametersFix" "false"
|
||||
//ERROR: Too many arguments for internal final fun component1(): kotlin.Int defined in Data
|
||||
//ERROR: Too many arguments for public final fun component1(): kotlin.Int defined in Data
|
||||
|
||||
data class Data(val i: Int) {}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create annotation 'foo'" "false"
|
||||
// ERROR: Unresolved reference: foo
|
||||
// ACTION: Make private
|
||||
// ACTION: Make public
|
||||
// ACTION: Make internal
|
||||
|
||||
J.<caret>foo(1, "2") fun test() {
|
||||
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A<Int, String> = throw Throwable("")
|
||||
internal fun foo(): <caret>A<Int, String> = throw Throwable("")
|
||||
Vendored
+1
-1
@@ -8,4 +8,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A.B = throw Throwable("")
|
||||
internal fun foo(): <caret>A.B = throw Throwable("")
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
// ACTION: Convert to block body
|
||||
// ACTION: Remove explicit type specification
|
||||
// ERROR: Unresolved reference: A
|
||||
fun foo(): J.<caret>A = throw Throwable("")
|
||||
internal fun foo(): J.<caret>A = throw Throwable("")
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): Int.<caret>A = throw Throwable("")
|
||||
internal fun foo(): Int.<caret>A = throw Throwable("")
|
||||
+1
-1
@@ -6,4 +6,4 @@
|
||||
// ACTION: Create enum 'A'
|
||||
// ACTION: Create interface 'A'
|
||||
// ERROR: Unresolved reference: A
|
||||
fun foo(): J.<caret>A = throw Throwable("")
|
||||
internal fun foo(): J.<caret>A = throw Throwable("")
|
||||
Vendored
+1
-1
@@ -8,4 +8,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A = throw Throwable("")
|
||||
internal fun foo(): <caret>A = throw Throwable("")
|
||||
Vendored
+1
-1
@@ -6,4 +6,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A<Int, String> = throw Throwable("")
|
||||
internal fun foo(): <caret>A<Int, String> = throw Throwable("")
|
||||
Vendored
+1
-1
@@ -8,4 +8,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A = throw Throwable("")
|
||||
internal fun foo(): <caret>A = throw Throwable("")
|
||||
Vendored
+1
-1
@@ -6,4 +6,4 @@
|
||||
// ERROR: Unresolved reference: A
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A<Int, String> = throw Throwable("")
|
||||
internal fun foo(): <caret>A<Int, String> = throw Throwable("")
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create function 'bar'" "false"
|
||||
// ACTION: Create annotation 'bar'
|
||||
// ACTION: Make internal
|
||||
// ACTION: Make private
|
||||
// ACTION: Make public
|
||||
// ERROR: Unresolved reference: foo
|
||||
// ERROR: Unresolved reference: bar
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix" "false"
|
||||
// ERROR: Too many arguments for kotlin.Deprecated internal fun oldFun(): kotlin.Unit defined in root package
|
||||
// ERROR: Too many arguments for kotlin.Deprecated public fun oldFun(): kotlin.Unit defined in root package
|
||||
|
||||
@Deprecated("", ReplaceWith("newFun()"))
|
||||
fun oldFun() {
|
||||
|
||||
@@ -4,6 +4,6 @@ interface ParseResult<out T> {
|
||||
public val value : T
|
||||
}
|
||||
|
||||
class Success<T>(<caret>public override val value : T) : ParseResult<T> {
|
||||
class Success<T>(override val value : T) : ParseResult<T> {
|
||||
public override val success : Boolean = true
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Change 'B.x' type to '(String) -> [ERROR : Ay]'" "false"
|
||||
// ACTION: Change 'A.x' type to '(Int) -> 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) → [ERROR : Ay] <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) → [ERROR : Ay] <i>defined in</i> A</html>
|
||||
// ERROR: Unresolved reference: Ay
|
||||
interface A {
|
||||
val x: (String) -> Ay
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Remove 'val' from parameter" "false"
|
||||
// ACTION: Make internal
|
||||
// ACTION: Make private
|
||||
// ACTION: Make public
|
||||
class C(<caret>val x: String) {
|
||||
}
|
||||
Reference in New Issue
Block a user