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
61 lines
1.8 KiB
Kotlin
Vendored
61 lines
1.8 KiB
Kotlin
Vendored
// FIR_IDENTICAL
|
|
abstract class Test() {
|
|
abstract val x : Int
|
|
abstract val x1 : Int get
|
|
abstract val x2 : Int <!ABSTRACT_PROPERTY_WITH_GETTER!>get() = 1<!>
|
|
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val a : Int<!>
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val b : Int<!> get
|
|
val c = 1
|
|
|
|
val c1 = 1
|
|
get
|
|
val c2 : Int
|
|
get() = 1
|
|
val c3 : Int
|
|
get() { return 1 }
|
|
val c4 : Int
|
|
get() = 1
|
|
<!MUST_BE_INITIALIZED!>val c5 : Int<!>
|
|
get() = field + 1
|
|
|
|
abstract var y : Int
|
|
abstract var y1 : Int get
|
|
abstract var y2 : Int set
|
|
abstract var y3 : Int set get
|
|
abstract var y4 : Int set <!ABSTRACT_PROPERTY_WITH_GETTER!>get() = 1<!>
|
|
abstract var y5 : Int <!ABSTRACT_PROPERTY_WITH_SETTER!>set(x) {}<!> <!ABSTRACT_PROPERTY_WITH_GETTER!>get() = 1<!>
|
|
abstract var y6 : Int <!ABSTRACT_PROPERTY_WITH_SETTER!>set(x) {}<!>
|
|
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var v : Int<!>
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var v1 : Int<!> get
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var v2 : Int<!> get set
|
|
<!MUST_BE_INITIALIZED!>var v3 : Int<!> get() = 1; set
|
|
var v4 : Int get() = 1; set(x){}
|
|
|
|
<!MUST_BE_INITIALIZED!>var v5 : Int<!> get() = 1; set(x){field = x}
|
|
<!MUST_BE_INITIALIZED!>var v6 : Int<!> get() = field + 1; set(x){}
|
|
|
|
abstract val v7 : Int get
|
|
abstract var v8 : Int get set
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var v9 : Int<!> set
|
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var v10 : Int<!> get
|
|
abstract val v11 : Int <!WRONG_MODIFIER_TARGET!>abstract<!> get
|
|
abstract var v12 : Int <!WRONG_MODIFIER_TARGET!>abstract<!> get <!WRONG_MODIFIER_TARGET!>abstract<!> set
|
|
|
|
}
|
|
|
|
open class Super(i : Int)
|
|
|
|
class TestPCParameters(w : Int, x : Int, val y : Int, var z : Int) : Super(w) {
|
|
|
|
val xx = w
|
|
|
|
init {
|
|
w + 1
|
|
}
|
|
|
|
fun foo() = <!UNRESOLVED_REFERENCE!>x<!>
|
|
|
|
}
|