72def186a3
The change is needed for the parallel resolution (^KT-55750), so we can resolve the declaration under a lock that is specific to this declaration. Previously, if LL FIR was resolving some FirClass, LL FIR resolved all its children too, and it had no control over what parts of the FIR tree were modified. The same applied to the designation path, sometimes the classes on the designation path might be unexpectedly (and without lock) modified. This commit introduces LLFirResolveTarget, which specifies which exact declarations should be resolved during the lazy resolution of the declaration. All elements outside the declarations specified for resolve in LLFirResolveTarget, should not be modified. The logic of lazy transformers is the following: - Go to target declaration collecting all scopes from the file and containing classes - Resolve only declarations that are specified by the LLFirResolveTarget, performing the resolve under a separate lock for each declaration ^KT-56543 ^KT-57619 Fixed
45 lines
1.0 KiB
Kotlin
Vendored
45 lines
1.0 KiB
Kotlin
Vendored
// !DIAGNOSTICS: +UNUSED_PARAMETER
|
|
import kotlin.reflect.KProperty
|
|
|
|
class C(a: Int, b: Int, c: Int, d: Int, <!UNUSED_PARAMETER!>e<!>: Int = d, val f: String) {
|
|
init {
|
|
a + a
|
|
}
|
|
|
|
val g = b
|
|
|
|
init {
|
|
c + c
|
|
}
|
|
}
|
|
|
|
fun f(a: Int, b: Int, <!UNUSED_PARAMETER!>c<!>: Int = b) {
|
|
a + a
|
|
}
|
|
|
|
fun Any.getValue(<!UNUSED_PARAMETER!>thisRef<!>: Any?, <!UNUSED_PARAMETER!>prop<!>: KProperty<*>): String = ":)"
|
|
fun Any.setValue(<!UNUSED_PARAMETER!>thisRef<!>: Any?, <!UNUSED_PARAMETER!>prop<!>: KProperty<*>, <!UNUSED_PARAMETER!>value<!>: String) {
|
|
}
|
|
|
|
fun Any.provideDelegate(<!UNUSED_PARAMETER!>thisRef<!>: Any?, <!UNUSED_PARAMETER!>prop<!>: KProperty<*>) {
|
|
}
|
|
|
|
operator fun Int.getValue(thisRef: Any?, prop: KProperty<*>): String = ":)"
|
|
|
|
operator fun Int.setValue(thisRef: Any?, prop: KProperty<*>, value: String) {
|
|
}
|
|
|
|
operator fun Int.provideDelegate(thisRef: Any?, prop: KProperty<*>) {
|
|
}
|
|
|
|
|
|
fun get(<!UNUSED_PARAMETER!>p<!>: Any) {
|
|
}
|
|
|
|
fun set(<!UNUSED_PARAMETER!>p<!>: Any) {
|
|
}
|
|
|
|
fun foo(s: String) {
|
|
s.<!UNRESOLVED_REFERENCE!>xxx<!> = 1
|
|
}
|