Update existing test data depending on diagnostic parameter rendering

This commit is contained in:
Pavel V. Talanov
2016-02-25 13:56:43 +03:00
parent 5304ddfca3
commit a4c005fefd
154 changed files with 292 additions and 292 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// "Make 'A' abstract" "false"
// ERROR: Class 'X' must override public open fun foo(): kotlin.Unit defined in X because it inherits many implementations of it
// ERROR: Class 'X' must override public open fun foo(): Unit defined in X because it inherits many implementations of it
// ACTION: Create test
// ACTION: Make internal
// ACTION: Make private
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.AddGenericUpperBoundFix" "false"
// ERROR: Type argument is not within its bounds: should be subtype of 'kotlin.Any'
// ERROR: Type argument is not within its bounds: should be subtype of 'Any'
fun <T : Any> foo() = 1
@@ -1,5 +1,5 @@
// "Add 'kotlin.Any' as upper bound for E" "true"
// ERROR: Type parameter bound for U in fun <T : kotlin.Any, U : kotlin.Any> foo(x: T, y: U): kotlin.Int<br> is not satisfied: inferred type F is not a subtype of kotlin.Any
// ERROR: Type parameter bound for U in fun <T : Any, U : Any> foo(x: T, y: U): Int<br> is not satisfied: inferred type F is not a subtype of Any
fun <T : Any, U: Any> foo(x: T, y: U) = 1
@@ -1,5 +1,5 @@
// "Add 'kotlin.Any' as upper bound for E" "true"
// ERROR: Type parameter bound for U in fun <T : kotlin.Any, U : kotlin.Any> foo(x: T, y: U): kotlin.Int<br> is not satisfied: inferred type F is not a subtype of kotlin.Any
// ERROR: Type parameter bound for U in fun <T : Any, U : Any> foo(x: T, y: U): Int<br> is not satisfied: inferred type F is not a subtype of Any
fun <T : Any, U: Any> foo(x: T, y: U) = 1
@@ -1,7 +1,7 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Missing 'getValue(testing.BigTest, kotlin.reflect.KProperty<*>)' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'setValue(testing.BigTest, kotlin.reflect.KProperty<*>, [ERROR : Type from delegate])' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'getValue(BigTest, KProperty<*>)' method on delegate of type 'DelegateImpl<Int>'
// ERROR: Missing 'setValue(BigTest, KProperty<*>, [ERROR : Type from delegate])' method on delegate of type 'DelegateImpl<Int>'
package testing
@@ -27,8 +27,8 @@ public operator fun <T> DelegateImpl<T>.setValue(thisRef: Any, property: KProper
// FILE: first.after.kt
// "Import" "true"
// ERROR: Missing 'getValue(testing.BigTest, kotlin.reflect.KProperty<*>)' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'setValue(testing.BigTest, kotlin.reflect.KProperty<*>, [ERROR : Type from delegate])' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'getValue(BigTest, KProperty<*>)' method on delegate of type 'DelegateImpl<Int>'
// ERROR: Missing 'setValue(BigTest, KProperty<*>, [ERROR : Type from delegate])' method on delegate of type 'DelegateImpl<Int>'
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Missing 'getValue(testing.BigTest, kotlin.reflect.KProperty<*>)' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'getValue(BigTest, KProperty<*>)' method on delegate of type 'DelegateImpl<Int>'
package testing
@@ -27,7 +27,7 @@ public operator fun <T> DelegateImpl<T>.getValue(thisRef: Any?, property: KPrope
// FILE: first.after.kt
// "Import" "true"
// ERROR: Missing 'getValue(testing.BigTest, kotlin.reflect.KProperty<*>)' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'getValue(BigTest, KProperty<*>)' method on delegate of type 'DelegateImpl<Int>'
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Missing 'setValue(testing.BigTest, kotlin.reflect.KProperty<*>, kotlin.Int)' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'setValue(BigTest, KProperty<*>, Int)' method on delegate of type 'DelegateImpl<Int>'
package testing
@@ -28,7 +28,7 @@ operator fun <T> DelegateImpl<T>.setValue(thisRef: Any, property: KProperty<*>,
// FILE: first.after.kt
// "Import" "true"
// ERROR: Missing 'setValue(testing.BigTest, kotlin.reflect.KProperty<*>, kotlin.Int)' method on delegate of type 'some.DelegateImpl<kotlin.Int>'
// ERROR: Missing 'setValue(BigTest, KProperty<*>, Int)' method on delegate of type 'DelegateImpl<Int>'
package testing
+1 -1
View File
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "false"
// ERROR: Missing 'getValue(kotlin.Nothing?, kotlin.reflect.KProperty<*>)' method on delegate of type 'kotlin.String'
// ERROR: Missing 'getValue(Nothing?, KProperty<*>)' method on delegate of type 'String'
package b
+3 -3
View File
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function invoke() is not found
package testing
@@ -14,7 +14,7 @@ fun testing() {
// FILE: second.kt
// "Import" "true"
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function invoke() is not found
package some
@@ -26,7 +26,7 @@ operator fun Some.invoke(s: String) {}
// FILE: first.after.kt
// "Import" "true"
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function invoke() is not found
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "false"
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function invoke() is not found
// ACTION: Create extension function 'invoke'
// ACTION: Create member function 'invoke'
@@ -17,7 +17,7 @@ fun testing() {
// FILE: second.kt
// "Import" "true"
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function invoke() is not found
package some
@@ -29,7 +29,7 @@ fun Some.invoke(s: String) {}
// FILE: first.after.kt
// "Import" "true"
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function invoke() is not found
// ACTION: Create extension function 'invoke'
// ACTION: Create member function 'invoke'
+1 -1
View File
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public fun kotlin.String.minus(i: java.lang.Integer): kotlin.String defined in h<br>public fun kotlin.String.minus(str: kotlin.String): kotlin.String defined in h
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public fun String.minus(i: Integer): String defined in h<br>public fun String.minus(str: String): String defined in h
package h
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public fun kotlin.String.minus(i: java.lang.Integer): kotlin.String defined in h<br>public fun kotlin.String.minus(str: kotlin.String): kotlin.String defined in h
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public fun String.minus(i: Integer): String defined in h<br>public fun String.minus(str: String): String defined in h
package h
@@ -1,7 +1,7 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -27,8 +27,8 @@ operator fun Some.component2() = 3
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -1,7 +1,7 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -36,8 +36,8 @@ operator fun Some.component2() = 3
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -1,7 +1,7 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -35,8 +35,8 @@ operator fun Some.component1() = 1
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -1,7 +1,7 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type aaa.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type aaa.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -37,8 +37,8 @@ operator fun Some.component2() = 3
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type aaa.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type aaa.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
package testing
@@ -26,7 +26,7 @@ operator fun Some.component2() = 3
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -26,7 +26,7 @@ operator fun Some.component2() = 3
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component2()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component2()' function
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "false"
// ERROR: Destructuring declaration initializer of type some.Some must have a 'component1()' function
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ACTION: Create extension function 'component1'
// ACTION: Create member function 'component1'
+2 -2
View File
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package testing
@@ -23,7 +23,7 @@ operator fun Some.plus(i: Int) : Some = this
// FILE: first.after.kt
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package testing
@@ -23,7 +23,7 @@ operator fun Some.plusAssign(i: Int) {}
// FILE: first.after.kt
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package testing
@@ -1,6 +1,6 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package testing
@@ -31,7 +31,7 @@ operator fun Some.plus(i: Int) : Some = this
// FILE: first.after.kt
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package testing
+1 -1
View File
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package h
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String defined in kotlin
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
package h
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun h.A.unaryPlus(): kotlin.Int defined in h
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun A.unaryPlus(): Int defined in h
package h
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun h.A.unaryPlus(): kotlin.Int defined in h
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun A.unaryPlus(): Int defined in h
package h
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.AddFunctionParametersFix" "false"
// ERROR: Too many arguments for public open operator fun equals(other: kotlin.Any?): kotlin.Boolean defined in kotlin.Any
// ERROR: Too many arguments for public open operator fun equals(other: Any?): Boolean defined in kotlin.Any
fun f(d: Any) {
d.equals("a", <caret>"b")
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.AddFunctionParametersFix" "false"
// ERROR: Too many arguments for public open fun equals(other: kotlin.Any?): kotlin.Boolean defined in java.lang.Object
// ERROR: Too many arguments for public open fun equals(other: Any?): Boolean defined in java.lang.Object
fun f(d: java.lang.Object) {
d.equals("a", <caret>"b")
@@ -1,5 +1,5 @@
// "Add parameter to function 'foo'" "true"
// ERROR: Too many arguments for public fun foo(): kotlin.Unit defined in b
// ERROR: Too many arguments for public fun foo(): Unit defined in b
package a
import b.foo
@@ -1,5 +1,5 @@
// "Add parameter to function 'foo'" "true"
// ERROR: Too many arguments for public fun foo(): kotlin.Unit defined in b
// ERROR: Too many arguments for public fun foo(): 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 public final operator fun component1(): kotlin.Int defined in Data
//ERROR: Too many arguments for public final operator fun component1(): Int defined in Data
data class Data(val i: Int) {}
@@ -1,5 +1,5 @@
// "Create class 'Foo'" "true"
// ERROR: Class 'Foo' must be declared abstract or implement abstract member public abstract operator fun getValue(thisRef: A<T>, property: kotlin.reflect.KProperty<*>): B defined in kotlin.properties.ReadOnlyProperty
// ERROR: Class 'Foo' must be declared abstract or implement abstract member public abstract operator fun getValue(thisRef: A<T>, property: KProperty<*>): B defined in kotlin.properties.ReadOnlyProperty
open class B
@@ -1,7 +1,7 @@
import kotlin.properties.ReadOnlyProperty
// "Create class 'Foo'" "true"
// ERROR: Class 'Foo' must be declared abstract or implement abstract member public abstract operator fun getValue(thisRef: A<T>, property: kotlin.reflect.KProperty<*>): B defined in kotlin.properties.ReadOnlyProperty
// ERROR: Class 'Foo' must be declared abstract or implement abstract member public abstract operator fun getValue(thisRef: A<T>, property: KProperty<*>): B defined in kotlin.properties.ReadOnlyProperty
open class B
@@ -2,7 +2,7 @@
// ACTION: Create function 'Foo'
// ACTION: Add parameter to constructor 'Foo'
// ACTION: Create secondary constructor
// ERROR: Too many arguments for public constructor Foo(a: kotlin.Int) defined in Foo
// ERROR: Too many arguments for public constructor Foo(a: Int) defined in Foo
class Foo(a: Int)
@@ -1,5 +1,5 @@
// "Create member function 'foo'" "true"
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is A<Int> but Int was expected
class A<T>(val n: T)
@@ -1,5 +1,5 @@
// "Create member function 'foo'" "true"
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is A<Int> but Int was expected
class A<T>(val n: T) {
fun foo(s: String, t: T): Any {
@@ -1,5 +1,5 @@
// "Create member property 'foo'" "true"
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is A<Int> but Int was expected
// ERROR: Property must be initialized or be abstract
class A<T>(val n: T)
@@ -1,5 +1,5 @@
// "Create member property 'foo'" "true"
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is A<Int> but Int was expected
// ERROR: Property must be initialized or be abstract
class A<T>(val n: T) {
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix" "false"
// ERROR: Too many arguments for @kotlin.Deprecated public fun oldFun(): kotlin.Unit defined in root package
// ERROR: Too many arguments for @Deprecated public fun oldFun(): Unit defined in root package
@Deprecated("", ReplaceWith("newFun()"))
fun oldFun() {
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix" "false"
// ERROR: The integer literal does not conform to the expected type kotlin.String
// ERROR: The integer literal does not conform to the expected type String
@Deprecated("", ReplaceWith("newFun()", imports = 123))
fun oldFun() {
@@ -1,5 +1,5 @@
// "Insert 'this()' call" "true"
// ERROR: None of the following functions can be called with the arguments supplied: <br>public constructor A(x: kotlin.Int) defined in A<br>public constructor A(x: kotlin.String) defined in A
// ERROR: None of the following functions can be called with the arguments supplied: <br>public constructor A(x: Int) defined in A<br>public constructor A(x: String) defined in A
class A(val x: Int) {
constructor(x: String)<caret>
@@ -1,5 +1,5 @@
// "Insert 'this()' call" "true"
// ERROR: None of the following functions can be called with the arguments supplied: <br>public constructor A(x: kotlin.Int) defined in A<br>public constructor A(x: kotlin.String) defined in A
// ERROR: None of the following functions can be called with the arguments supplied: <br>public constructor A(x: Int) defined in A<br>public constructor A(x: String) defined in A
class A(val x: Int) {
constructor(x: String) : this(<caret>)
@@ -1,6 +1,6 @@
// "Replace invalid positioned arguments for annotation" "true"
// WITH_RUNTIME
// ERROR: Only named arguments are available for Java annotations
// ERROR: The integer literal does not conform to the expected type kotlin.String
// ERROR: The integer literal does not conform to the expected type String
@Ann(1, arg1 = 2) class A
@@ -1,6 +1,6 @@
// "Replace invalid positioned arguments for annotation" "true"
// WITH_RUNTIME
// ERROR: Only named arguments are available for Java annotations
// ERROR: The integer literal does not conform to the expected type kotlin.String
// ERROR: The integer literal does not conform to the expected type String
@Ann(1, 2<caret>) class A
@@ -1,7 +1,7 @@
// "Make 'object : T {}' abstract" "false"
// ACTION: Implement members
// ACTION: Split property declaration
// ERROR: Object must be declared abstract or implement abstract member public abstract fun foo(): kotlin.Unit defined in T
// ERROR: Object must be declared abstract or implement abstract member public abstract fun foo(): Unit defined in T
interface T {
fun foo()
}
+1 -1
View File
@@ -2,7 +2,7 @@
// ACTION: Create test
// ACTION: Implement members
// ACTION: Move 'Some' to separate file
// ERROR: Object 'Some' must be declared abstract or implement abstract member public abstract fun foo(): kotlin.Unit defined in T
// ERROR: Object 'Some' must be declared abstract or implement abstract member public abstract fun foo(): Unit defined in T
interface T {
fun foo()
}
@@ -5,7 +5,7 @@
// ACTION: Make internal
// ACTION: Make private
// ACTION: Move 'A' to separate file
// ERROR: Class 'A' must be declared abstract or implement abstract member public abstract fun foo(): kotlin.Int defined in I
// ERROR: Class 'A' must be declared abstract or implement abstract member public abstract fun foo(): Int defined in I
interface I {
fun foo(): Int
}
@@ -4,7 +4,7 @@
// ACTION: Make internal
// ACTION: Make private
// ACTION: Move 'A' to separate file
// ERROR: Object 'A' must be declared abstract or implement abstract member public abstract val foo: kotlin.Int defined in I
// ERROR: Object 'A' must be declared abstract or implement abstract member public abstract val foo: Int defined in I
interface I {
val foo: Int
}
@@ -1,5 +1,5 @@
// "Change function signature..." "true"
// ERROR: Class 'B' must be declared abstract or implement abstract member public abstract fun f(a: kotlin.String): kotlin.Unit defined in A
// ERROR: Class 'B' must be declared abstract or implement abstract member public abstract fun f(a: String): Unit defined in A
interface A {
fun f(a: Int)
fun f(a: String)
@@ -1,5 +1,5 @@
// "Change function signature..." "true"
// ERROR: Class 'B' must be declared abstract or implement abstract member public abstract fun f(a: kotlin.String): kotlin.Unit defined in A
// ERROR: Class 'B' must be declared abstract or implement abstract member public abstract fun f(a: String): Unit defined in A
interface A {
fun f(a: Int)
fun f(a: String)
@@ -1,5 +1,5 @@
// "Change function signature to 'fun f(a: Int): Int'" "true"
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is String but Int was expected
open class A {
open fun f(a: Int): Int = 0
}
@@ -1,5 +1,5 @@
// "Change function signature to 'fun f(a: Int): Int'" "true"
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is String but Int was expected
open class A {
open fun f(a: Int): Int = 0
}
@@ -1,6 +1,6 @@
// "Change 'A.x' type to '(Int) -> Int'" "false"
// ACTION: Change 'C.x' type to '(String) -> Int'
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (kotlin.String) -> kotlin.Int defined in A'
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (String) -> Int defined in A'
interface A {
val x: (String) -> Int
}
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ChangeVariableTypeFix" "false"
// ERROR: Type of 'x' doesn't match the type of the overridden var-property 'public abstract var x: kotlin.Int defined in A'
// ERROR: Type of 'x' doesn't match the type of the overridden var-property 'public abstract var x: Int defined in A'
interface A {
var x: Int
}
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ChangeVariableTypeFix" "false"
// ERROR: Type of 'x' doesn't match the type of the overridden var-property 'public abstract var x: kotlin.String defined in A'
// ERROR: Type of 'x' doesn't match the type of the overridden var-property 'public abstract var x: String defined in A'
interface A {
var x: String
}
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ChangeFunctionReturnTypeFix" "false"
// ERROR: Return type of 'foo' is not a subtype of the return type of the overridden member 'public abstract fun foo(): kotlin.Int defined in A'
// ERROR: Return type of 'foo' is not a subtype of the return type of the overridden member 'public abstract fun foo(): Int defined in A'
interface A {
fun foo(): Int
}
@@ -1,5 +1,5 @@
// "Change 'prop' type to 'Int'" "true"
// ERROR: Null can not be a value of a non-null type kotlin.Int
// ERROR: Null can not be a value of a non-null type Int
interface Test<T> {
val prop : T
}
@@ -1,5 +1,5 @@
// "Change 'prop' type to 'Int'" "true"
// ERROR: Null can not be a value of a non-null type kotlin.Int
// ERROR: Null can not be a value of a non-null type Int
interface Test<T> {
val prop : T
}
@@ -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: Return type of 'foo' is not a subtype of the return type of the overridden member 'public abstract fun foo(): kotlin.Int defined in A'
// ERROR: Return type of 'foo' is not a subtype of the return type of the overridden member 'public abstract fun foo(): Int defined in A'
abstract class A {
abstract fun foo() : Int;
}
@@ -1,5 +1,5 @@
// "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true"
// ERROR: The integer literal does not conform to the expected type kotlin.String
// ERROR: The integer literal does not conform to the expected type String
@Suppress(1)
fun foo(): String?<caret>? = null
@@ -1,5 +1,5 @@
// "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true"
// ERROR: The integer literal does not conform to the expected type kotlin.String
// ERROR: The integer literal does not conform to the expected type String
@Suppress(1, "REDUNDANT_NULLABLE")
fun foo(): String?<caret>? = null
@@ -1,6 +1,6 @@
// "Add non-null asserted (!!) call" "false"
// ACTION: Change parameter 's' type of function 'other' to 'String?'
// ERROR: Type mismatch: inferred type is kotlin.String? but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is String? but Int was expected
fun test() {
val s: String? = ""
other(<caret>s)
+1 -1
View File
@@ -1,6 +1,6 @@
// "Cast expression 'Foo<Number>()' to 'Foo<Int>'" "false"
// ACTION: Create test
// ERROR: Type mismatch: inferred type is Foo<kotlin.Number> but Foo<kotlin.Int> was expected
// ERROR: Type mismatch: inferred type is Foo<Number> but Foo<Int> was expected
class Foo<T>
fun foo(): Foo<Int> {
@@ -1,5 +1,5 @@
// "Change 'A.component2' function return type to 'Unit'" "true"
// ERROR: The integer literal does not conform to the expected type kotlin.Unit
// ERROR: The integer literal does not conform to the expected type Unit
abstract class A {
abstract operator fun component1(): Int
operator fun component2() = 42
@@ -1,5 +1,5 @@
// "Change 'A.component2' function return type to 'Unit'" "true"
// ERROR: The integer literal does not conform to the expected type kotlin.Unit
// ERROR: The integer literal does not conform to the expected type Unit
abstract class A {
abstract operator fun component1(): Int
operator fun component2(): Unit = 42
@@ -1,6 +1,6 @@
// "Change 'B.x' type to '(String) -> [ERROR : Ay]'" "false"
// ACTION: Change 'A.x' type to '(Int) -> Int'
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (kotlin.String) -> [ERROR : Ay] defined in A'
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (String) -> [ERROR : Ay] defined in A'
// ERROR: Unresolved reference: Ay
interface A {
val x: (String) -> Ay
@@ -1,5 +1,5 @@
// "Cast expression 'x' to 'List<Any>?'" "true"
// ERROR: Java type mismatch expected kotlin.collections.(Mutable)List<kotlin.Any!>! but found kotlin.collections.MutableList<kotlin.String>. Use explicit cast
// ERROR: Java type mismatch expected (Mutable)List<Any!>! but found MutableList<String>. Use explicit cast
fun main(x: MutableList<String>) {
A.foo(x as List<Any>?)
@@ -1,5 +1,5 @@
// "Cast expression 'x' to 'List<Any>?'" "true"
// ERROR: Java type mismatch expected kotlin.collections.(Mutable)List<kotlin.Any!>! but found kotlin.collections.MutableList<kotlin.String>. Use explicit cast
// ERROR: Java type mismatch expected (Mutable)List<Any!>! but found MutableList<String>. Use explicit cast
fun main(x: MutableList<String>) {
A.foo(<caret>x)
@@ -1,5 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ChangeParameterTypeFix" "false"
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is String but Int was expected
interface A {
fun f(i: Int): Boolean
}
@@ -1,5 +1,5 @@
// "???" "false"
//ERROR: Type mismatch: inferred type is kotlin.Array<out kotlin.Int> but kotlin.Array<out kotlin.String> was expected
//ERROR: Type mismatch: inferred type is Array<out Int> but Array<out String> was expected
//this test checks that there is no ArrayIndexOutOfBoundsException when there are more arguments than parameters
fun <T> array1(vararg a : T) = a
@@ -4,7 +4,7 @@
// ACTION: Create enum 'NoSuchType'
// ACTION: Create interface 'NoSuchType'
// ACTION: Remove explicit lambda parameter types (may break code)
// ERROR: Type mismatch: inferred type is ([ERROR : NoSuchType]) -> kotlin.Int but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is ([ERROR : NoSuchType]) -> Int but Int was expected
// ERROR: Unresolved reference: NoSuchType
fun foo(): Int {
@@ -1,7 +1,7 @@
// "Change 'AA.f' function return type to 'Boolean'" "false"
// ACTION: Change 'AAA.g' function return type to 'Int'
// ACTION: Convert to expression body
// ERROR: Type mismatch: inferred type is kotlin.Int but kotlin.Boolean was expected
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
interface A {
fun f(): Int
}
@@ -2,7 +2,7 @@
// ACTION: Change 'AAA.g' function return type to 'Boolean'
// ACTION: Convert to expression body
// ACTION: Replace overloaded operator with function call
// ERROR: Type mismatch: inferred type is kotlin.Boolean but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is Boolean but Int was expected
interface A {
operator fun contains(i: Int): Boolean
}
@@ -1,5 +1,5 @@
// "Change to property access" "false"
// ERROR: Expression 'fd' of type 'kotlin.String' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'fd' of type 'String' cannot be invoked as a function. The function invoke() is not found
class A(val fd: String)
fun x() {