[FIR] Don't duplicate annotations from enum entry to its initializer
This commit is contained in:
committed by
TeamCityServer
parent
9f547171da
commit
f1bf3c0d5a
-1
@@ -673,7 +673,6 @@ class DeclarationsConverter(
|
||||
classKind = ClassKind.ENUM_ENTRY
|
||||
scopeProvider = baseScopeProvider
|
||||
symbol = FirAnonymousObjectSymbol()
|
||||
annotations += modifiers.annotations
|
||||
val enumClassWrapper = ClassWrapper(
|
||||
enumEntryName, modifiers, ClassKind.ENUM_ENTRY, this,
|
||||
hasPrimaryConstructor = true,
|
||||
|
||||
@@ -793,7 +793,6 @@ open class RawFirBuilder(
|
||||
scopeProvider = this@RawFirBuilder.baseScopeProvider
|
||||
symbol = FirAnonymousObjectSymbol()
|
||||
|
||||
extractAnnotationsTo(this)
|
||||
val delegatedEntrySelfType = buildResolvedTypeRef {
|
||||
type =
|
||||
ConeClassLikeTypeImpl(this@buildAnonymousObject.symbol.toLookupTag(), emptyArray(), isNullable = false)
|
||||
|
||||
+2
-2
@@ -29,14 +29,14 @@ FILE: annotation.kt
|
||||
super<R|kotlin/Enum<My>|>()
|
||||
}
|
||||
|
||||
@base() public final static enum entry FIRST: R|My| = @base() object : R|My| {
|
||||
@base() public final static enum entry FIRST: R|My| = object : R|My| {
|
||||
private constructor(): R|<anonymous>| {
|
||||
super<R|My|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@base() public final static enum entry SECOND: R|My| = @base() object : R|My| {
|
||||
@base() public final static enum entry SECOND: R|My| = object : R|My| {
|
||||
private constructor(): R|<anonymous>| {
|
||||
super<R|My|>()
|
||||
}
|
||||
|
||||
+2
-2
@@ -29,14 +29,14 @@ FILE: annotation.kt
|
||||
super<R|kotlin/Enum<My>|>()
|
||||
}
|
||||
|
||||
@base() public final static [ContainingClassKey=My] enum entry FIRST: R|My| = @base() object : R|My| {
|
||||
@base() public final static [ContainingClassKey=My] enum entry FIRST: R|My| = object : R|My| {
|
||||
private [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
|
||||
super<R|My|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@base() public final static [ContainingClassKey=My] enum entry SECOND: R|My| = @base() object : R|My| {
|
||||
@base() public final static [ContainingClassKey=My] enum entry SECOND: R|My| = object : R|My| {
|
||||
private [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
|
||||
super<R|My|>()
|
||||
}
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ open enum class TestEnum : Enum<TestEnum> {
|
||||
|
||||
@TestAnn(x = "ENTRY2")
|
||||
ENTRY2 = ENTRY2()
|
||||
@TestAnn(x = "ENTRY2")
|
||||
private enum entry class ENTRY2 : TestEnum {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestEnum*/()
|
||||
|
||||
-2
@@ -45,8 +45,6 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum.ENTRY2'
|
||||
class: CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:private superTypes:[<root>.TestEnum]
|
||||
annotations:
|
||||
TestAnn(x = 'ENTRY2')
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum.ENTRY2
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum.ENTRY2 [primary]
|
||||
BLOCK_BODY
|
||||
|
||||
Reference in New Issue
Block a user