Use default render to check are all errors mentioned in tests. It's far more easier to read.
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Make 'A' abstract" "false"
|
||||
// ERROR: <html>Class 'X' must override <b>public</b> <b>open</b> <b>fun</b> foo(): kotlin.Unit <i>defined in</i> X<br />because it inherits many implementations of it</html>
|
||||
// ERROR: Class 'X' must override public open fun foo(): kotlin.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: <html>Type argument is not within its bounds.<table><tr><td>Expected:</td><td>kotlin.Any</td></tr><tr><td>Found:</td><td>E</td></tr></table></html>
|
||||
// ERROR: Type argument is not within its bounds: should be subtype of 'kotlin.Any'
|
||||
|
||||
fun <T : Any> foo() = 1
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Add 'kotlin.Any' as upper bound for E" "true"
|
||||
// ERROR: <html>Type parameter bound for <b>U</b> in <table><tr><td width="10%"></td><td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <T : kotlin.Any, U : kotlin.Any> foo</td><td style="white-space:nowrap;font-weight:bold;">(</td><td align="right" style="white-space:nowrap;font-weight:bold;">x: T,</td><td align="right" style="white-space:nowrap;font-weight:bold;">y: U</td><td style="white-space:nowrap;font-weight:bold;">)</td><td style="white-space:nowrap;font-weight:bold;">: kotlin.Int</td></tr></table> is not satisfied: inferred type <font color=red><b>F</b></font> is not a subtype of <b>kotlin.Any</b></html>
|
||||
// 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
|
||||
|
||||
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: <html>Type parameter bound for <b>U</b> in <table><tr><td width="10%"></td><td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <T : kotlin.Any, U : kotlin.Any> foo</td><td style="white-space:nowrap;font-weight:bold;">(</td><td align="right" style="white-space:nowrap;font-weight:bold;">x: T,</td><td align="right" style="white-space:nowrap;font-weight:bold;">y: U</td><td style="white-space:nowrap;font-weight:bold;">)</td><td style="white-space:nowrap;font-weight:bold;">: kotlin.Int</td></tr></table> is not satisfied: inferred type <font color=red><b>F</b></font> is not a subtype of <b>kotlin.Any</b></html>
|
||||
// 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
|
||||
|
||||
fun <T : Any, U: Any> foo(x: T, y: U) = 1
|
||||
|
||||
|
||||
+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>public</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Unit <i>defined in</i> T</html>
|
||||
// ERROR: Object must be declared abstract or implement abstract member public abstract fun foo(): kotlin.Unit defined in T
|
||||
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>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>
|
||||
// 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
|
||||
|
||||
package h
|
||||
|
||||
@@ -8,7 +8,7 @@ import util.minus
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
h - "other"
|
||||
h <caret>- "other"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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>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>
|
||||
// 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
|
||||
|
||||
package h
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package testing
|
||||
|
||||
@@ -23,7 +23,7 @@ operator fun Some.plus(i: Int) : Some = this
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package testing
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package testing
|
||||
|
||||
@@ -23,7 +23,7 @@ operator fun Some.plusAssign(i: Int) {}
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package testing
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package testing
|
||||
|
||||
@@ -31,7 +31,7 @@ operator fun Some.plus(i: Int) : Some = this
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: <html>Unresolved reference. <br/> None of the following candidates is applicable because of receiver type mismatch: <ul><li><b>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package testing
|
||||
|
||||
|
||||
@@ -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>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
package h
|
||||
|
||||
@@ -8,5 +8,5 @@ import util.plus
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
h + "other"
|
||||
h <caret>+ "other"
|
||||
}
|
||||
@@ -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>public</b> operator <b>fun</b> kotlin.String?.plus(other: kotlin.Any?): kotlin.String <i>defined in</i> kotlin</li></ul></html>
|
||||
// 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
|
||||
|
||||
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>public</b> operator <b>fun</b> h.A.unaryPlus(): kotlin.Int <i>defined in</i> h</li></ul></html>
|
||||
// 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
|
||||
|
||||
package h
|
||||
|
||||
@@ -8,7 +8,7 @@ import util.unaryPlus
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
+h
|
||||
<caret>+h
|
||||
}
|
||||
|
||||
class A()
|
||||
|
||||
@@ -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>public</b> operator <b>fun</b> h.A.unaryPlus(): kotlin.Int <i>defined in</i> h</li></ul></html>
|
||||
// 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
|
||||
|
||||
package h
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Class 'Foo' must be declared abstract or implement abstract member<br/><b>public</b> <b>abstract</b> operator <b>fun</b> getValue(thisRef: A<T>, property: kotlin.reflect.KProperty<*>): B <i>defined in</i> kotlin.properties.ReadOnlyProperty</html>
|
||||
// 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
|
||||
|
||||
open class B
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Class 'Foo' must be declared abstract or implement abstract member<br/><b>public</b> <b>abstract</b> operator <b>fun</b> getValue(thisRef: A<T>, property: kotlin.reflect.KProperty<*>): B <i>defined in</i> kotlin.properties.ReadOnlyProperty</html>
|
||||
// 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
|
||||
|
||||
open class B
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type inference failed: <table><tr><td width="10%"></td><td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>constructor</b> Foo<U></td><td style="white-space:nowrap;font-weight:bold;">(</td><td align="right" style="white-space:nowrap;font-weight:bold;">u: U</td><td style="white-space:nowrap;font-weight:bold;">)</td><td style="white-space:nowrap;font-weight:bold;"></td></tr><tr><td colspan="7" style="white-space:nowrap;">cannot be applied to</td></tr><tr><td width="10%"></td><td style="white-space:nowrap;"></td><td style="white-space:nowrap;"></td><td style="white-space:nowrap;"><b>(</b></td><td align="right" style="white-space:nowrap;"><font color=red><b>U</b></font></td><td style="white-space:nowrap;"><b>)</b></td></tr></table></html>
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>U</td></tr><tr><td>Found:</td><td>U</td></tr></table></html>
|
||||
// ERROR: Type inference failed: constructor Foo<U>(u: U)<br>cannot be applied to<br>(U)<br>
|
||||
// ERROR: Type mismatch: inferred type is U but U was expected
|
||||
|
||||
class A<T>(val n: T) {
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type inference failed: <table><tr><td width="10%"></td><td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>constructor</b> Foo<U></td><td style="white-space:nowrap;font-weight:bold;">(</td><td align="right" style="white-space:nowrap;font-weight:bold;">u: U</td><td style="white-space:nowrap;font-weight:bold;">)</td><td style="white-space:nowrap;font-weight:bold;"></td></tr><tr><td colspan="7" style="white-space:nowrap;">cannot be applied to</td></tr><tr><td width="10%"></td><td style="white-space:nowrap;"></td><td style="white-space:nowrap;"></td><td style="white-space:nowrap;"><b>(</b></td><td align="right" style="white-space:nowrap;"><font color=red><b>U</b></font></td><td style="white-space:nowrap;"><b>)</b></td></tr></table></html>
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>U</td></tr><tr><td>Found:</td><td>U</td></tr></table></html>
|
||||
// ERROR: Type inference failed: constructor Foo<U>(u: U)<br>cannot be applied to<br>(U)<br>
|
||||
// ERROR: Type mismatch: inferred type is U but U was expected
|
||||
|
||||
class A<T>(val n: T) {
|
||||
inner class Foo<U>(u: U) {
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>V</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but V was expected
|
||||
// ERROR: The integer literal does not conform to the expected type U
|
||||
|
||||
class B<T>(val t: T) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>V</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but V was expected
|
||||
// ERROR: The integer literal does not conform to the expected type U
|
||||
|
||||
class B<T>(val t: T) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>U</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but U was expected
|
||||
|
||||
class B<T>(val t: T) {
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>U</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but U was expected
|
||||
|
||||
class B<T>(val t: T) {
|
||||
inner class Foo<U>(i: Int, u: U) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>W</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but W was expected
|
||||
// ERROR: The integer literal does not conform to the expected type V
|
||||
|
||||
class B<T>(val t: T) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>W</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but W was expected
|
||||
// ERROR: The integer literal does not conform to the expected type V
|
||||
|
||||
class B<T>(val t: T) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create member function 'foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>A<kotlin.Int></td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create member function 'foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>A<kotlin.Int></td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun foo(s: String, t: T): Any {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// ACTION: Add parameter to constructor 'A'
|
||||
// ACTION: Change 'b' type to 'A'
|
||||
// ACTION: Create function 'A'
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>B</td></tr><tr><td>Found:</td><td>A</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is A but B was expected
|
||||
// ERROR: Too many arguments for public constructor A() defined in A
|
||||
|
||||
class A
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create member property 'foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>A<kotlin.Int></td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create member property 'foo'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>A<kotlin.Int></td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is A<kotlin.Int> but kotlin.Int was expected
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
|
||||
class A<T>(val n: T) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Insert 'this()' call" "true"
|
||||
// ERROR: <html>None of the following functions can be called with the arguments supplied. <ul><li><init>(<font color=red><b>Int</b></font>) <i>defined in</i> A</li><li><init>(<font color=red><b>String</b></font>) <i>defined in</i> A</li></ul></html>
|
||||
// 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
|
||||
|
||||
class A(val x: Int) {
|
||||
constructor(x: String)<caret>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Insert 'this()' call" "true"
|
||||
// ERROR: <html>None of the following functions can be called with the arguments supplied. <ul><li><init>(<font color=red><b>Int</b></font>) <i>defined in</i> A</li><li><init>(<font color=red><b>String</b></font>) <i>defined in</i> A</li></ul></html>
|
||||
// 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
|
||||
|
||||
class A(val x: Int) {
|
||||
constructor(x: String) : this(<caret>)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature..." "true"
|
||||
// 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>
|
||||
// ERROR: Class 'B' must be declared abstract or implement abstract member public abstract fun f(a: kotlin.String): kotlin.Unit defined in A
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
fun f(a: String)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Change function signature..." "true"
|
||||
// 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>
|
||||
// ERROR: Class 'B' must be declared abstract or implement abstract member public abstract fun f(a: kotlin.String): kotlin.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: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
|
||||
open class A {
|
||||
open fun f(a: Int): Int = 0
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int): Int'" "true"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
|
||||
open class A {
|
||||
open fun f(a: Int): Int = 0
|
||||
}
|
||||
|
||||
+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>public</b> <b>abstract</b> <b>val</b> x: (kotlin.String) → kotlin.Int <i>defined in</i> A</html>
|
||||
// ERROR: Return type of 'x' is not a subtype of the return type of the overridden member 'public abstract val x: (kotlin.String) -> kotlin.Int defined in A'
|
||||
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>public</b> <b>abstract</b> <b>var</b> x: kotlin.Int <i>defined in</i> A</html>
|
||||
// ERROR: Type of 'x' doesn't match the type of the overridden var-property 'public abstract var x: kotlin.Int defined in A'
|
||||
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>public</b> <b>abstract</b> <b>var</b> x: kotlin.String <i>defined in</i> A</html>
|
||||
// ERROR: Type of 'x' doesn't match the type of the overridden var-property 'public abstract var x: kotlin.String defined in A'
|
||||
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>public</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Int <i>defined in</i> A</html>
|
||||
// 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'
|
||||
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>public</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Int <i>defined in</i> A</html>
|
||||
// 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'
|
||||
abstract class A {
|
||||
abstract fun foo() : Int;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Add non-null asserted (!!) call" "false"
|
||||
// ACTION: Change parameter 's' type of function 'other' to 'String?'
|
||||
// ERROR: <html>ype mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>kotlin.String?</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String? but kotlin.Int was expected
|
||||
fun test() {
|
||||
val s: String? = ""
|
||||
other(<caret>s)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Cast expression 'Foo<Number>()' to 'Foo<Int>'" "false"
|
||||
// ACTION: Create test
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>Foo<kotlin.Int></td></tr><tr><td>Found:</td><td>Foo<kotlin.Number></td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is Foo<kotlin.Number> but Foo<kotlin.Int> was expected
|
||||
class Foo<T>
|
||||
|
||||
fun foo(): Foo<Int> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.CastExpressionFix" "false"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>B</td></tr><tr><td>Found:</td><td>A</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is A but B was expected
|
||||
open class A
|
||||
class B : A()
|
||||
|
||||
|
||||
+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>public</b> <b>abstract</b> <b>val</b> x: (kotlin.String) → [ERROR : Ay] <i>defined in</i> A</html>
|
||||
// ERROR: Return type of 'x' is not a subtype of the return type of the overridden member 'public abstract val x: (kotlin.String) -> [ERROR : Ay] defined in A'
|
||||
// ERROR: Unresolved reference: Ay
|
||||
interface A {
|
||||
val x: (String) -> Ay
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeParameterTypeFix" "false"
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
|
||||
interface A {
|
||||
fun f(i: Int): Boolean
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "???" "false"
|
||||
//ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Array<out kotlin.String></td></tr><tr><td>Found:</td><td>kotlin.Array<out kotlin.Int></td></tr></table></html>
|
||||
//ERROR: Type mismatch: inferred type is kotlin.Array<out kotlin.Int> but kotlin.Array<out kotlin.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
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// ACTION: Create enum 'NoSuchType'
|
||||
// ACTION: Create interface 'NoSuchType'
|
||||
// ACTION: Remove explicit lambda parameter types (may break code)
|
||||
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>([ERROR : NoSuchType]) → kotlin.Int</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is ([ERROR : NoSuchType]) -> kotlin.Int but kotlin.Int was expected
|
||||
// ERROR: Unresolved reference: NoSuchType
|
||||
|
||||
fun foo(): Int {
|
||||
|
||||
+1
-1
@@ -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: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Boolean</td></tr><tr><td>Found:</td><td>kotlin.Int</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.Int but kotlin.Boolean was expected
|
||||
interface A {
|
||||
fun f(): Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -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: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>kotlin.Boolean</td></tr></table></html>
|
||||
// ERROR: Type mismatch: inferred type is kotlin.Boolean but kotlin.Int was expected
|
||||
interface A {
|
||||
fun contains(i: Int): Boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user