[fir2ir] Fix annotation conversion on partial module compilation
Backend requires annotation constructors to be fully resolved for the 'IrConst' default value lowering. However, in the IDE there is usually no need in complete annotation class resolution. ^KTIJ-27061 Fixed
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
foo() + bar()
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT
|
||||
FILE fqName:<root> fileName:fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.CodeFragment [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
FUN name:run visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: CALL 'public final fun foo (): kotlin.Int declared in <root>.MainKt' type=kotlin.Int origin=null
|
||||
other: CALL 'public final fun bar (): kotlin.Int declared in <root>.MainKt' type=kotlin.Int origin=null
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// FILE: lib.kt
|
||||
package lib
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION)
|
||||
annotation class Anno(val x: String = "foo")
|
||||
|
||||
// FILE: main.kt
|
||||
import lib.Anno
|
||||
|
||||
@Anno
|
||||
fun foo(): Int = 5
|
||||
|
||||
@Anno(x = "bar")
|
||||
fun bar(): Int = 10
|
||||
|
||||
fun test() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(): int
|
||||
}
|
||||
Reference in New Issue
Block a user