"Change return type fix" now handles data class properties correctly #KT-15028 Fixed
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeFunctionReturnTypeFix" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeCallableReturnTypeFix" "false"
|
||||
// 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
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Change type of accessed property 'A.x' to 'String'" "true"
|
||||
|
||||
// See KT-15028 (CCE)
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun f1(a: A) {
|
||||
val (x: String, y) = a<caret>
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Change type of accessed property 'A.x' to 'String'" "true"
|
||||
|
||||
// See KT-15028 (CCE)
|
||||
data class A(val x: String, val y: String)
|
||||
|
||||
fun f1(a: A) {
|
||||
val (x: String, y) = a<caret>
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeFunctionReturnTypeFix" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeCallableReturnTypeFix" "false"
|
||||
// ACTION: Change type of 'b' to 'A'
|
||||
// ACTION: Convert property initializer to getter
|
||||
// ACTION: Let 'A' implement interface 'B'
|
||||
|
||||
Reference in New Issue
Block a user