Fix add import quick fix for delegated property and missing extension
^KT-39199 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
f453649d0b
commit
943f03e55f
+10
@@ -0,0 +1,10 @@
|
||||
// "Import" "true"
|
||||
// WITH_RUNTIME
|
||||
// ERROR: Type 'MyDelegate<TypeVariable(T)>' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
|
||||
|
||||
package import
|
||||
|
||||
import base.MyDelegate
|
||||
import base.getValue
|
||||
|
||||
val myVal by MyDelegate { false }
|
||||
idea/testData/quickfix/autoImports/importGetValueExtensionForDelegateWithLambda.before.Dependency.kt
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package base
|
||||
|
||||
class MyDelegate<T>(init: () -> T) {
|
||||
var value: T = init()
|
||||
}
|
||||
|
||||
operator fun <T> MyDelegate<T>.getValue(thisObj: Any?, property: kotlin.reflect.KProperty<*>): T = value
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// WITH_RUNTIME
|
||||
// ERROR: Type 'MyDelegate<TypeVariable(T)>' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
|
||||
|
||||
package import
|
||||
|
||||
import base.MyDelegate
|
||||
|
||||
val myVal by <caret>MyDelegate { false }
|
||||
Reference in New Issue
Block a user