FIR: partial implementation of delegate resolve #KT-32217 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class C(val map: MutableMap<String, Any>) {
|
||||
var foo by map
|
||||
}
|
||||
|
||||
var bar by hashMapOf<String, Any>()
|
||||
@@ -0,0 +1,25 @@
|
||||
FILE: simpleDelegatedToMap.kt
|
||||
public final class C : R|kotlin/Any| {
|
||||
public constructor(map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>|): R|C| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>| = R|<local>/map|
|
||||
public get(): R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>|
|
||||
|
||||
public final var foo: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>by R|<local>/map|
|
||||
public get(): <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]> {
|
||||
^ D|/C.foo|.<Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#(this#, ::R|/C.foo|)
|
||||
}
|
||||
public set(<set-?>: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>): R|kotlin/Unit| {
|
||||
D|/C.foo|.<Inapplicable(INAPPLICABLE): [kotlin/collections/setValue]>#(this#, ::R|/C.foo|, R|<local>/<set-?>|)
|
||||
}
|
||||
|
||||
}
|
||||
public final var bar: <ERROR TYPE REF: Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>by R|kotlin/collections/hashMapOf|<R|kotlin/String|, R|kotlin/Any|>()
|
||||
public get(): <ERROR TYPE REF: Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]> {
|
||||
^ D|/bar|.<Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>#(Null(null), ::R|/bar|)
|
||||
}
|
||||
public set(<set-?>: <ERROR TYPE REF: Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>): R|kotlin/Unit| {
|
||||
D|/bar|.<Inapplicable(WRONG_RECEIVER): [kotlin/collections/setValue]>#(Null(null), ::R|/bar|, R|<local>/<set-?>|)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
//val x = lazy { "Hello" }.getValue(null, throw null)
|
||||
val x by lazy { "Hello" }
|
||||
|
||||
fun foo() {
|
||||
x.length
|
||||
|
||||
val y by lazy { "Bye" }
|
||||
y.length
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
FILE: simpleLazy.kt
|
||||
public final val x: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
|
||||
String(Hello)
|
||||
}
|
||||
)
|
||||
public get(): R|kotlin/String| {
|
||||
^ D|/x|.R|kotlin/getValue|<R|kotlin/String|>(Null(null), ::R|/x|)
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|/x|.R|kotlin/String.length|
|
||||
lval y: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
|
||||
String(Bye)
|
||||
}
|
||||
)
|
||||
R|<local>/y|.R|kotlin/String.length|
|
||||
}
|
||||
Reference in New Issue
Block a user