Fix invalid usage of descriptorToDeclaration in QuickFixFactoryForTypeMismatchError
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// "Change 'AA.f' function return type to 'Boolean'" "false"
|
||||
// ACTION: Change 'AAA.g' function return type to 'Int'
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Disable 'Convert to Expression Body'
|
||||
// ACTION: Edit intention settings
|
||||
// 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>
|
||||
trait A {
|
||||
fun f(): Int
|
||||
}
|
||||
|
||||
open class AA {
|
||||
fun f() = 3
|
||||
}
|
||||
|
||||
class AAA: AA(), A {
|
||||
fun g(): Boolean {
|
||||
return f<caret>()
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// "Change 'AA.contains' function return type to 'Int'" "false"
|
||||
// ACTION: Change 'AAA.g' function return type to 'Boolean'
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Disable 'Convert to Expression Body'
|
||||
// ACTION: Disable 'Replace Overloaded Operator With Function Call'
|
||||
// ACTION: Edit intention settings
|
||||
// ACTION: Edit intention settings
|
||||
// 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>
|
||||
trait A {
|
||||
fun contains(i: Int): Boolean
|
||||
}
|
||||
|
||||
open class AA {
|
||||
fun contains(i: Int) = true
|
||||
}
|
||||
|
||||
class AAA: AA(), A {
|
||||
fun g(): Int {
|
||||
return 3 i<caret>n this
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user