Fir2Ir scripts: fix declarations registration and processing

This commit is contained in:
Ilya Chernikov
2023-04-27 17:53:33 +02:00
committed by Space Team
parent 5824b9c59c
commit 9adf24950a
12 changed files with 23 additions and 40 deletions
@@ -17,9 +17,9 @@ class Nested {
val innerThisProp = this<!UNRESOLVED_LABEL!>@NestedInnerClass<!>.property
inner class InnerInner {
fun f() = <!UNRESOLVED_REFERENCE!>innerFun<!>()
fun g() = <!UNRESOLVED_REFERENCE!>innerProp<!>
fun h() = this@Inner.<!UNRESOLVED_REFERENCE!>innerFun<!>()
fun i() = this@Inner.<!UNRESOLVED_REFERENCE!>innerProp<!>
fun f() = innerFun()
fun g() = innerProp
fun h() = this@Inner.innerFun()
fun i() = this@Inner.innerProp
}
}
@@ -1,11 +1,11 @@
// !WITH_NEW_INFERENCE
val (a1, a2) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>A()<!>
val (b1: Int, b2: Int) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>A()<!>
val (a1, a2) = A()
val (b1: Int, b2: Int) = A()
val (c1) = <!COMPONENT_FUNCTION_MISSING, UNRESOLVED_REFERENCE!>unresolved<!>
<!WRONG_MODIFIER_TARGET!>private<!> val (d1) = <!COMPONENT_FUNCTION_MISSING!>A()<!>
<!WRONG_MODIFIER_TARGET!>private<!> val (d1) = A()
val (e1, _) = <!COMPONENT_FUNCTION_MISSING!>A()<!>
val (e1, _) = A()
<!UNRESOLVED_REFERENCE!>a1<!>
<!UNRESOLVED_REFERENCE!>a2<!>
@@ -1,7 +0,0 @@
val (a, b, c) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>A<!NO_VALUE_FOR_PARAMETER!>()<!><!>
class A(val a: Int) {
operator fun component1() {}
operator fun component2() {}
operator fun component3() {}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
val (a, b, c) = A<!NO_VALUE_FOR_PARAMETER!>()<!>
class A(val a: Int) {
@@ -1,20 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int {
return 1
}
}
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>Delegate()<!>
class Foo {
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>Delegate()<!>
}
fun foo() {
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>Delegate()<!>
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
import kotlin.reflect.KProperty