[FIR] Look for annotations generated by backend based on declaration-site session
Test dump for klib does not correlate to real case (CLI compilation of JS or Native), because for some reason KLib facade in MPP scenario uses session/module of each specific file, instand of session for leaf platform module In CLI scenario only one session is used, so annotations are generated properly ^KT-61833 Fixed
This commit is contained in:
committed by
Space Team
parent
9514f8f873
commit
49071374b4
+2
-1
@@ -30,6 +30,7 @@ class TransformerForAddingAnnotations(val context: IrPluginContext) : IrElementV
|
||||
private val markerAnnotationFqName = FqName("org.jetbrains.kotlin.fir.plugin.AddAnnotations")
|
||||
private val annotationToAddId = ClassId(FqName("org.jetbrains.kotlin.fir.plugin"), Name.identifier("AnnotationToAdd"))
|
||||
private val annotationToAddFqName = annotationToAddId.asSingleFqName()
|
||||
private const val prefixNameForClass = "VerySpecificName"
|
||||
}
|
||||
|
||||
private val annotationsAdder = AnnotationsAdder()
|
||||
@@ -43,7 +44,7 @@ class TransformerForAddingAnnotations(val context: IrPluginContext) : IrElementV
|
||||
}
|
||||
|
||||
override fun visitClass(declaration: IrClass) {
|
||||
if (declaration.hasAnnotation(markerAnnotationFqName)) {
|
||||
if (declaration.hasAnnotation(markerAnnotationFqName) || declaration.name.asString().startsWith(prefixNameForClass)) {
|
||||
declaration.acceptVoid(annotationsAdder)
|
||||
}
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final class VerySpecificNameInCommon : R|kotlin/Any| {
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
@PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) field:@FIELD:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final val x: R|kotlin/Int|
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public get(): R|kotlin/Int|
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public constructor(@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) x: R|kotlin/Int|): R|test/VerySpecificNameInCommon|
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final class Derived : R|kotlin/Any| {
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public constructor(): R|test/VerySpecificNameInCommon.Derived|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final class VerySpecificNameInPlatform : R|kotlin/Any| {
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
@PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) field:@FIELD:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final val x: R|kotlin/Int|
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public get(): R|kotlin/Int|
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public constructor(@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) x: R|kotlin/Int|): R|test/VerySpecificNameInPlatform|
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final class Derived : R|kotlin/Any| {
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public constructor(): R|test/VerySpecificNameInPlatform.Derived|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
public final class VerySpecificNameInCommon : R|kotlin/Any| {
|
||||
public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
public final val x: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public constructor(x: R|kotlin/Int|): R|test/VerySpecificNameInCommon|
|
||||
|
||||
public final class Derived : R|kotlin/Any| {
|
||||
public constructor(): R|test/VerySpecificNameInCommon.Derived|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final class VerySpecificNameInPlatform : R|kotlin/Any| {
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
@PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final val x: R|kotlin/Int|
|
||||
@PROPERTY_GETTER:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY_GETTER:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY_GETTER:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY_GETTER:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @PROPERTY_GETTER:R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public get(): R|kotlin/Int|
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public constructor(@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) x: R|kotlin/Int|): R|test/VerySpecificNameInPlatform|
|
||||
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public final class Derived : R|kotlin/Any| {
|
||||
@R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) @R|org/jetbrains/kotlin/fir/plugin/AnnotationToAdd|(booleanValue = Boolean(true), byteValue = Byte(1), charValue = Char(c), doubleValue = Double(4.2), floatValue = Float(2.4), intValue = Int(42), longValue = Long(24), shortValue = Short(7), stringValue = String(OK)) public constructor(): R|test/VerySpecificNameInPlatform.Derived|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
plugins/fir-plugin-prototype/testData/firLoadK2Compiled/annotationsGeneratedInBackend_MPP.fir.kt.txt
Vendored
+107
@@ -0,0 +1,107 @@
|
||||
// MODULE: <common>
|
||||
// FILE: module_common_annotationsGeneratedInBackend_MPP.kt
|
||||
package test
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
class VerySpecificNameInCommon {
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
constructor(@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK") x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
val x: Int
|
||||
field = x
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
get
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
class Derived {
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MODULE: main
|
||||
// FILE: module_common_annotationsGeneratedInBackend_MPP.kt
|
||||
package test
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
class VerySpecificNameInCommon {
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
constructor(@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK") x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
val x: Int
|
||||
field = x
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
get
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
class Derived {
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// FILE: module_main_annotationsGeneratedInBackend_MPP.kt
|
||||
package test
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
class VerySpecificNameInPlatform {
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
constructor(@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK") x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
val x: Int
|
||||
field = x
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
get
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
class Derived {
|
||||
@AnnotationToAdd(booleanValue = true, byteValue = 1B, charValue = 'c', doubleValue = 4.2, floatValue = 2.4F, intValue = 42, longValue = 24L, shortValue = 7S, stringValue = "OK")
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// PLATFORM_DEPENDANT_METADATA
|
||||
// DUMP_KT_IR
|
||||
// LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: common
|
||||
package test
|
||||
|
||||
class VerySpecificNameInCommon(val x: Int) {
|
||||
fun foo() {}
|
||||
|
||||
class Derived
|
||||
}
|
||||
|
||||
// MODULE: main()()(common)
|
||||
package test
|
||||
|
||||
class VerySpecificNameInPlatform(val x: Int) {
|
||||
fun foo() {}
|
||||
|
||||
class Derived
|
||||
}
|
||||
+6
@@ -31,6 +31,12 @@ public class FirLoadK2CompiledWithPluginJsKotlinTestGenerated extends AbstractFi
|
||||
runTest("plugins/fir-plugin-prototype/testData/firLoadK2Compiled/annotationsGeneratedInBackend.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationsGeneratedInBackend_MPP.kt")
|
||||
public void testAnnotationsGeneratedInBackend_MPP() throws Exception {
|
||||
runTest("plugins/fir-plugin-prototype/testData/firLoadK2Compiled/annotationsGeneratedInBackend_MPP.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
|
||||
+6
@@ -31,6 +31,12 @@ public class FirLoadK2CompiledWithPluginJvmKotlinTestGenerated extends AbstractF
|
||||
runTest("plugins/fir-plugin-prototype/testData/firLoadK2Compiled/annotationsGeneratedInBackend.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationsGeneratedInBackend_MPP.kt")
|
||||
public void testAnnotationsGeneratedInBackend_MPP() throws Exception {
|
||||
runTest("plugins/fir-plugin-prototype/testData/firLoadK2Compiled/annotationsGeneratedInBackend_MPP.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user