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
-1
@@ -2,7 +2,7 @@
|
||||
// ACTION: Create extension function 'Delegate.getValue'
|
||||
// ACTION: Create member function 'Delegate.getValue'
|
||||
// ACTION: Introduce import alias
|
||||
// ERROR: Missing 'getValue(Nothing?, KProperty<*>)' method on delegate of type 'Delegate'
|
||||
// ERROR: Type 'Delegate' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
fun test() {
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
// ACTION: Create extension function 'Delegate.getValue', function 'Delegate.setValue'
|
||||
// ACTION: Create member function 'Delegate.getValue', function 'Delegate.setValue'
|
||||
// ACTION: Introduce import alias
|
||||
// ERROR: Missing 'getValue(Nothing?, KProperty<*>)' method on delegate of type 'Delegate'
|
||||
// ERROR: Missing 'setValue(Nothing?, KProperty<*>, String)' method on delegate of type 'Delegate'
|
||||
// ERROR: Type 'Delegate' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
|
||||
// ERROR: Type 'Delegate' has no method 'setValue(Nothing?, KProperty<*>, String)' and thus it cannot serve as a delegate for var (read-write property)
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
fun test() {
|
||||
|
||||
Reference in New Issue
Block a user