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
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING("getValue(Nothing?, KProperty<*>)", "A")!>A()<!>
|
||||
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING("getValue(Nothing?, KProperty<*>)", "A", "delegate")!>A()<!>
|
||||
|
||||
class A
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
var a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING("setValue(Nothing?, KProperty<*>, Int)", "A")!>A()<!>
|
||||
var a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING("setValue(Nothing?, KProperty<*>, Int)", "A", "delegate for var (read-write property)")!>A()<!>
|
||||
|
||||
class A {
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
||||
|
||||
Reference in New Issue
Block a user