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
+3 -3
View File
@@ -5,7 +5,7 @@ interface Base {
}
class Derived : Base {
override fun foo(): <error descr="[RETURN_TYPE_MISMATCH_ON_OVERRIDE] Return type of 'foo' is not a subtype of the return type of the overridden member 'public abstract fun foo(): kotlin.Int defined in Base'">String</error> = ""
override var bar: <error descr="[VAR_TYPE_MISMATCH_ON_OVERRIDE] Type of 'bar' doesn't match the type of the overridden var-property 'public abstract var bar: kotlin.Int defined in Base'">String</error> = ""
override val qux: <error descr="[PROPERTY_TYPE_MISMATCH_ON_OVERRIDE] Type of 'qux' is not a subtype of the overridden property 'public abstract val qux: kotlin.Int defined in Base'">String</error> = ""
override fun foo(): <error descr="[RETURN_TYPE_MISMATCH_ON_OVERRIDE] Return type of 'foo' is not a subtype of the return type of the overridden member 'public abstract fun foo(): Int defined in Base'">String</error> = ""
override var bar: <error descr="[VAR_TYPE_MISMATCH_ON_OVERRIDE] Type of 'bar' doesn't match the type of the overridden var-property 'public abstract var bar: Int defined in Base'">String</error> = ""
override val qux: <error descr="[PROPERTY_TYPE_MISMATCH_ON_OVERRIDE] Type of 'qux' is not a subtype of the overridden property 'public abstract val qux: Int defined in Base'">String</error> = ""
}
+2 -2
View File
@@ -2,7 +2,7 @@ class Rule(val apply: () -> Unit)
fun foo() {
val rule: Rule? = Rule { }
rule?.<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type (() -> kotlin.Unit)?, use explicit ?.invoke() to make function-like call instead">apply</error>()
rule?.<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type (() -> Unit)?, use explicit ?.invoke() to make function-like call instead">apply</error>()
val apply = rule?.apply
<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type (() -> kotlin.Unit)?, use explicit ?.invoke() to make function-like call instead">apply</error>()
<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type (() -> Unit)?, use explicit ?.invoke() to make function-like call instead">apply</error>()
}
@@ -1 +1 @@
this.foo(<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is kotlin.String but T was expected">"a"</error>)
this.foo(<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is String but T was expected">"a"</error>)
+8 -8
View File
@@ -153,13 +153,13 @@ fun getStringLength(obj : Any) : Char? {
fun toInt(i: Int?): Int = if (i != null) <info descr="Smart cast to kotlin.Int">i</info> else 0
fun illegalWhenBody(a: Any): Int = when(a) {
is Int -> <info descr="Smart cast to kotlin.Int">a</info>
is String -> <error descr="[TYPE_MISMATCH] Type mismatch: inferred type is kotlin.Any but kotlin.Int was expected">a</error>
is String -> <error descr="[TYPE_MISMATCH] Type mismatch: inferred type is Any but Int was expected">a</error>
else -> 1
}
fun illegalWhenBlock(a: Any): Int {
when(a) {
is Int -> return <info descr="Smart cast to kotlin.Int">a</info>
is String -> return <error descr="[TYPE_MISMATCH] Type mismatch: inferred type is kotlin.Any but kotlin.Int was expected">a</error>
is String -> return <error descr="[TYPE_MISMATCH] Type mismatch: inferred type is Any but Int was expected">a</error>
else -> return 1
}
}
@@ -218,9 +218,9 @@ fun f(): String {
<info descr="Smart cast to kotlin.String"><info descr="Wrapped into a reference object to be modified when captured in a closure">a</info></info>.compareTo("f")
val <warning>f</warning>: Function0<String> = {
<info>a</info> = 42
<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is kotlin.Any but kotlin.String was expected">a</error>
<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is Any but String was expected">a</error>
}
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'kotlin.String' is impossible, because 'a' is a local variable that is captured by a changing closure">a</error>
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'String' is impossible, because 'a' is a local variable that is captured by a changing closure">a</error>
}
return ""
}
@@ -232,13 +232,13 @@ class Mutable(var <info descr="This property has a backing field">x</info>: Stri
fun foo(): String {
if (x is String) {
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'kotlin.String' is impossible, because 'x' is a mutable property that could have been changed by this time">x</error>
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'String' is impossible, because 'x' is a mutable property that could have been changed by this time">x</error>
}
if (x != null) {
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'kotlin.String' is impossible, because 'x' is a mutable property that could have been changed by this time">x</error>
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'String' is impossible, because 'x' is a mutable property that could have been changed by this time">x</error>
}
if (xx is String) {
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'kotlin.String' is impossible, because 'xx' is a property that has open or custom getter">xx</error>
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'String' is impossible, because 'xx' is a property that has open or custom getter">xx</error>
}
return ""
}
@@ -246,7 +246,7 @@ class Mutable(var <info descr="This property has a backing field">x</info>: Stri
fun bar(other: Mutable): String {
var y = other
if (y.x is String) {
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'kotlin.String' is impossible, because 'y.x' is a complex expression">y.x</error>
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'String' is impossible, because 'y.x' is a complex expression">y.x</error>
}
return ""
}
@@ -1,5 +1,5 @@
// ERROR: 'public open fun foo(): kotlin.Unit' conflicts with another declaration in class 'C'
// ERROR: 'public open fun foo(): kotlin.Unit' conflicts with another declaration in class 'C'
// ERROR: 'public open fun foo(): Unit' conflicts with another declaration in class 'C'
// ERROR: 'public open fun foo(): Unit' conflicts with another declaration in class 'C'
interface I {
open fun foo(){}
}
@@ -1,4 +1,4 @@
// ERROR: Type mismatch: inferred type is kotlin.Unit but a.A was expected
// ERROR: Type mismatch: inferred type is Unit but A was expected
package to
import a.*
@@ -1,4 +1,4 @@
// ERROR: Type mismatch: inferred type is kotlin.Unit but d.A was expected
// ERROR: Type mismatch: inferred type is Unit but A was expected
package to
import d.A
@@ -1,4 +1,4 @@
// ERROR: Type mismatch: inferred type is kotlin.Unit but d.A was expected
// ERROR: Type mismatch: inferred type is Unit but A was expected
package to
import d.A
@@ -1,4 +1,4 @@
// ERROR: Expression 'staticField' of type 'kotlin.Int' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'staticField' of type 'Int' cannot be invoked as a function. The function invoke() is not found
package to
import a.JavaF
@@ -1,4 +1,4 @@
// ERROR: Type mismatch: inferred type is kotlin.Unit but to.A was expected
// ERROR: Type mismatch: inferred type is Unit but A was expected
// ERROR: Function 'ext' must have a body
package to
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: None of the following functions can be called with the arguments supplied: <br>public fun foo(s: kotlin.String, b: kotlin.Boolean, c: kotlin.Char): kotlin.Unit defined in root package<br>public fun foo(s: kotlin.String, b: kotlin.Boolean, p: kotlin.Int): kotlin.Unit defined in root package
// ERROR: None of the following functions can be called with the arguments supplied: <br>public fun foo(s: String, b: Boolean, c: Char): Unit defined in root package<br>public fun foo(s: String, b: Boolean, p: Int): Unit defined in root package
fun foo(s: String, b: Boolean, p: Int){}
fun foo(s: String, b: Boolean, c: Char){}
@@ -1,7 +1,7 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
// ERROR: Type mismatch: inferred type is kotlin.Int but kotlin.Boolean was expected
// ERROR: Condition must be of type kotlin.Boolean, but is of type kotlin.Int
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
// ERROR: Condition must be of type Boolean, but is of type Int
// ERROR: Infix call corresponds to a dot-qualified call 'foo.times(10)' which is not allowed on a nullable receiver 'foo'. Use ?.-qualified call instead
fun String?.times(a: Int): Boolean = a == 0
@@ -1,6 +1,6 @@
// IS_APPLICABLE: false
// ERROR: Type mismatch: inferred type is kotlin.Int but kotlin.Boolean was expected
// ERROR: Condition must be of type kotlin.Boolean, but is of type kotlin.Int
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
// ERROR: Condition must be of type Boolean, but is of type Int
// ERROR: Infix call corresponds to a dot-qualified call 'foo.times(10)' which is not allowed on a nullable receiver 'foo'. Use ?.-qualified call instead
fun main(args: Array<String>) {
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
fun main(args: Array<String>) {
val foo: String? = "foo"
if<caret> {
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
fun main(args: Array<String>) {
val foo: String? = "foo"
if (foo == null<caret>) {
@@ -1,5 +1,5 @@
// ERROR: Expected condition of type kotlin.Boolean
// ERROR: Expected condition of type kotlin.Boolean
// ERROR: Expected condition of type Boolean
// ERROR: Expected condition of type Boolean
// SKIP_ERRORS_AFTER
fun test(n: Int): String {
@@ -1,5 +1,5 @@
// ERROR: Expected condition of type kotlin.Boolean
// ERROR: Expected condition of type kotlin.Boolean
// ERROR: Expected condition of type Boolean
// ERROR: Expected condition of type Boolean
// SKIP_ERRORS_AFTER
fun test(n: Int): String {
@@ -1,6 +1,6 @@
// IS_APPLICABLE: false
// WITH_RUNTIME
// ERROR: None of the following functions can be called with the arguments supplied: <br>@kotlin.internal.InlineOnly public inline fun assert(value: kotlin.Boolean): kotlin.Unit defined in kotlin<br>@kotlin.internal.InlineOnly public inline fun assert(value: kotlin.Boolean, lazyMessage: () -> kotlin.Any): kotlin.Unit defined in kotlin
// ERROR: None of the following functions can be called with the arguments supplied: <br>@InlineOnly public inline fun assert(value: Boolean): Unit defined in kotlin<br>@InlineOnly public inline fun assert(value: Boolean, lazyMessage: () -> Any): Unit defined in kotlin
fun foo() {
<caret>assert()
@@ -1,4 +1,4 @@
// ERROR: Too many arguments for public final fun foo(): kotlin.Boolean defined in A
// ERROR: Too many arguments for public final fun foo(): Boolean defined in A
// SHOULD_FAIL_WITH: Call with arguments will be skipped: foo(2)
class A(val n: Int) {
fun <caret>foo(): Boolean = n > 1
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// 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
fun foo(a: Boolean, b: Boolean) : Boolean {
return !<caret>(!a + b)
}
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: Class 'C' must be declared abstract or implement abstract base class member public abstract fun foo(): kotlin.Int defined in B
// ERROR: Class 'C' must be declared abstract or implement abstract base class member public abstract fun foo(): Int defined in B
interface A {
fun <caret>foo(): Int
}
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: Class 'C' must be declared abstract or implement abstract base class member public abstract val foo: kotlin.Int defined in B
// ERROR: Class 'C' must be declared abstract or implement abstract base class member public abstract val foo: Int defined in B
interface A {
val <caret>foo: Int
}
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: Class 'C' must be declared abstract or implement abstract base class member public abstract val foo: kotlin.Int defined in B
// ERROR: Class 'C' must be declared abstract or implement abstract base class member public abstract val foo: Int defined in B
interface A {
val <caret>foo: Int
}
@@ -1,7 +1,7 @@
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
// WITH_RUNTIME
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: java.awt.Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: java.awt.Component!, p1: kotlin.Int, p2: kotlin.Int, p3: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: java.awt.Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: java.awt.Component!, p1: kotlin.Int, p2: kotlin.Int, p3: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: Component!, p1: Int, p2: Int, p3: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: Component!, p1: Int, p2: Int, p3: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: Unresolved reference: unresolved
import javax.swing.SwingUtilities
@@ -1,7 +1,7 @@
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
// WITH_RUNTIME
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: java.awt.Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: java.awt.Component!, p1: kotlin.Int, p2: kotlin.Int, p3: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: java.awt.Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: java.awt.Component!, p1: kotlin.Int, p2: kotlin.Int, p3: java.awt.Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: Component!, p1: Int, p2: Int, p3: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(p0: Component!, p1: [ERROR : Unresolved java classifier: Point]!, p2: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(p0: Component!, p1: Int, p2: Int, p3: Component!): [ERROR : Unresolved java classifier: Point]! defined in javax.swing.SwingUtilities
// ERROR: Unresolved reference: unresolved
import javax.swing.SwingUtilities
@@ -1,5 +1,5 @@
// IS_AVAILABLE: true
// ERROR: None of the following functions can be called with the arguments supplied: <br>public fun bar(a: kotlin.Int = ..., f: (kotlin.Int) -> kotlin.Int): kotlin.Unit defined in root package<br>public fun bar(a: kotlin.Int, b: kotlin.Int, f: (kotlin.Int) -> kotlin.Int): kotlin.Unit defined in root package
// ERROR: None of the following functions can be called with the arguments supplied: <br>public fun bar(a: Int = ..., f: (Int) -> Int): Unit defined in root package<br>public fun bar(a: Int, b: Int, f: (Int) -> Int): Unit defined in root package
// ERROR: Unresolved reference: it
// SKIP_ERRORS_AFTER
@@ -1,5 +1,5 @@
// IS_AVAILABLE: true
// ERROR: None of the following functions can be called with the arguments supplied: <br>public fun bar(a: kotlin.Int = ..., f: (kotlin.Int) -> kotlin.Int): kotlin.Unit defined in root package<br>public fun bar(a: kotlin.Int, b: kotlin.Int, f: (kotlin.Int) -> kotlin.Int): kotlin.Unit defined in root package
// ERROR: None of the following functions can be called with the arguments supplied: <br>public fun bar(a: Int = ..., f: (Int) -> Int): Unit defined in root package<br>public fun bar(a: Int, b: Int, f: (Int) -> Int): Unit defined in root package
// ERROR: Unresolved reference: it
// SKIP_ERRORS_AFTER
@@ -1,5 +1,5 @@
// IS_APPLICABLE: true
// ERROR: Type mismatch: inferred type is () -> ??? but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is () -> ??? but Int was expected
// ERROR: No value passed for parameter b
// ERROR: Unresolved reference: it
// SKIP_ERRORS_AFTER
@@ -1,5 +1,5 @@
// IS_APPLICABLE: true
// ERROR: Type mismatch: inferred type is () -> ??? but kotlin.Int was expected
// ERROR: Type mismatch: inferred type is () -> ??? but Int was expected
// ERROR: No value passed for parameter b
// ERROR: Unresolved reference: it
// SKIP_ERRORS_AFTER
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: None of the following functions can be called with the arguments supplied: <br>public final fun foo(p: kotlin.Int): kotlin.Unit defined in B<br>public open fun foo(p: kotlin.String): kotlin.Unit defined in B
// ERROR: None of the following functions can be called with the arguments supplied: <br>public final fun foo(p: Int): Unit defined in B<br>public open fun foo(p: String): Unit defined in B
open class B {
open fun foo(p: String){}
@@ -1,6 +1,6 @@
// IS_APPLICABLE: false
// WITH_RUNTIME
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Unit was expected
// ERROR: Type mismatch: inferred type is String but Unit was expected
class A {
public fun <caret>foo() {
+1 -1
View File
@@ -1,6 +1,6 @@
// IS_APPLICABLE: false
// ERROR: 'if' must have both main and 'else' branches if used as an expression
// ERROR: Expression 'if "test" is String' of type 'kotlin.Unit' cannot be invoked as a function. The function invoke() is not found
// ERROR: Expression 'if "test" is String' of type 'Unit' cannot be invoked as a function. The function invoke() is not found
fun <T> doSomething(a: T) {}
+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)

Some files were not shown because too many files have changed in this diff Show More