Files
kotlin-fork/idea/testData/quickfix/autoImports/delegateNoOperator.test
T
Pavel Kirpichenkov 55cb9561c2 Provide better error messages for read-only delegate
Split error reporting into two parts for incorrect and missing candidates.
Missing function error is not reported on provideDelegate.
Update error factory and default message for error.
Update error texts in quick fix test data.

#KT-16526 Fixed
2019-09-12 14:58:21 +03:00

17 lines
511 B
Plaintext
Vendored

// FILE: first.before.kt
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ERROR: Type 'String' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
// ACTION: To raw string literal
package b
val x: String by "<caret>" // <--- should not propose to auto-import a.getValue,
// because that would not fix the error
// FILE: second.kt
package a
import kotlin.reflect.KProperty
fun String.getValue(x: Any?, y: KProperty<*>) = ""