[FIR] FirRenderer: add missing resolvePhaseRenderer usage for anonymous initializer and dangling modifiers
This commit is contained in:
committed by
Space Team
parent
c9df6aff5f
commit
c6bb9af823
Vendored
+4
-4
@@ -4,14 +4,14 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevel.kt
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
public final [ResolvedTo(BODY_RESOLVE)] class Bar : R|kotlin/Any| {
|
public final [ResolvedTo(BODY_RESOLVE)] class Bar : R|kotlin/Any| {
|
||||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Bar| {
|
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Bar| {
|
||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
public final [ResolvedTo(BODY_RESOLVE)] class Outer : R|kotlin/Any| {
|
public final [ResolvedTo(BODY_RESOLVE)] class Outer : R|kotlin/Any| {
|
||||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer| {
|
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer| {
|
||||||
@@ -23,7 +23,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevel.kt
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
|
|
||||||
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
|
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
|
||||||
@@ -32,7 +32,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevel.kt
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -8,7 +8,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevelScript.kts
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
|
|
||||||
public final [ResolvedTo(BODY_RESOLVE)] class Bar : R|kotlin/Any| {
|
public final [ResolvedTo(BODY_RESOLVE)] class Bar : R|kotlin/Any| {
|
||||||
@@ -16,7 +16,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevelScript.kts
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
|
|
||||||
public final [ResolvedTo(BODY_RESOLVE)] class Outer : R|kotlin/Any| {
|
public final [ResolvedTo(BODY_RESOLVE)] class Outer : R|kotlin/Any| {
|
||||||
@@ -29,7 +29,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevelScript.kts
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
|
|
||||||
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
|
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
|
||||||
@@ -38,9 +38,10 @@ FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationClassLevelScript.kts
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationTopLevel.kt
|
FILE: [ResolvedTo(BODY_RESOLVE)] danglingAnnotationTopLevel.kt
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
+1
-1
@@ -4,7 +4,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] initBlock.kt
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
[ResolvedTo(BODY_RESOLVE)] init {
|
||||||
[ResolvedTo(RAW_FIR)] lval x: R|kotlin/Int| = Int(10)
|
[ResolvedTo(RAW_FIR)] lval x: R|kotlin/Int| = Int(10)
|
||||||
local final [ResolvedTo(RAW_FIR)] class B : R|kotlin/Any| {
|
local final [ResolvedTo(RAW_FIR)] class B : R|kotlin/Any| {
|
||||||
public [ResolvedTo(RAW_FIR)] constructor(): R|<local>/B| {
|
public [ResolvedTo(RAW_FIR)] constructor(): R|<local>/B| {
|
||||||
|
|||||||
+2
-1
@@ -8,7 +8,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] initBlockScript.kts
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
[ResolvedTo(BODY_RESOLVE)] init {
|
||||||
[ResolvedTo(RAW_FIR)] lval x: R|kotlin/Int| = Int(10)
|
[ResolvedTo(RAW_FIR)] lval x: R|kotlin/Int| = Int(10)
|
||||||
local final [ResolvedTo(RAW_FIR)] class B : R|kotlin/Any| {
|
local final [ResolvedTo(RAW_FIR)] class B : R|kotlin/Any| {
|
||||||
public [ResolvedTo(RAW_FIR)] constructor(): R|<local>/B| {
|
public [ResolvedTo(RAW_FIR)] constructor(): R|<local>/B| {
|
||||||
@@ -20,3 +20,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] initBlockScript.kts
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,4 +7,4 @@ FIR element rendered:
|
|||||||
|
|
||||||
FIR FILE:
|
FIR FILE:
|
||||||
FILE: [ResolvedTo(IMPORTS)] danglingAnnotation.kt
|
FILE: [ResolvedTo(IMPORTS)] danglingAnnotation.kt
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
Vendored
+1
-1
@@ -12,5 +12,5 @@ FILE: [ResolvedTo(IMPORTS)] danglingAnnotationInClass.kt
|
|||||||
super<R|kotlin/Any|>()
|
super<R|kotlin/Any|>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ FILE: [ResolvedTo(IMPORTS)] argsFromInit.kts
|
|||||||
LAZY_super<R|kotlin/Any|>
|
LAZY_super<R|kotlin/Any|>
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
[ResolvedTo(BODY_RESOLVE)] init {
|
||||||
<Unresolved name: foo>#(<L> = [ResolvedTo(RAW_FIR)] foo@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
|
<Unresolved name: foo>#(<L> = [ResolvedTo(RAW_FIR)] foo@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
|
||||||
^ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
|
^ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@ FIR element: FirAnonymousInitializerImpl
|
|||||||
FIR source kind: KtRealSourceElementKind
|
FIR source kind: KtRealSourceElementKind
|
||||||
|
|
||||||
FIR element rendered:
|
FIR element rendered:
|
||||||
init {
|
[ResolvedTo(BODY_RESOLVE)] init {
|
||||||
[ResolvedTo(RAW_FIR)] lval i: R|kotlin/Int| = Int(1)
|
[ResolvedTo(RAW_FIR)] lval i: R|kotlin/Int| = Int(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ FILE: [ResolvedTo(IMPORTS)] initializerConflict.kt
|
|||||||
LAZY_super<R|kotlin/Any|>
|
LAZY_super<R|kotlin/Any|>
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
[ResolvedTo(BODY_RESOLVE)] init {
|
||||||
[ResolvedTo(RAW_FIR)] lval i: R|kotlin/Int| = Int(1)
|
[ResolvedTo(RAW_FIR)] lval i: R|kotlin/Int| = Int(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@ FIR element: FirDanglingModifierListImpl
|
|||||||
FIR source kind: DanglingModifierList
|
FIR source kind: DanglingModifierList
|
||||||
|
|
||||||
FIR element rendered:
|
FIR element rendered:
|
||||||
<DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] <DANGLING MODIFIER: Top level declaration expected>
|
||||||
|
|
||||||
FIR FILE:
|
FIR FILE:
|
||||||
FILE: [ResolvedTo(IMPORTS)] secondaryConstructor.kt
|
FILE: [ResolvedTo(IMPORTS)] secondaryConstructor.kt
|
||||||
@@ -17,5 +17,5 @@ FILE: [ResolvedTo(IMPORTS)] secondaryConstructor.kt
|
|||||||
|
|
||||||
public final [ResolvedTo(STATUS)] fun <no name provided>(): R|kotlin/Unit| { LAZY_BLOCK }
|
public final [ResolvedTo(STATUS)] fun <no name provided>(): R|kotlin/Unit| { LAZY_BLOCK }
|
||||||
|
|
||||||
<DANGLING MODIFIER: Top level declaration expected>
|
[ResolvedTo(BODY_RESOLVE)] <DANGLING MODIFIER: Top level declaration expected>
|
||||||
}
|
}
|
||||||
@@ -458,11 +458,13 @@ class FirRenderer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitAnonymousInitializer(anonymousInitializer: FirAnonymousInitializer) {
|
override fun visitAnonymousInitializer(anonymousInitializer: FirAnonymousInitializer) {
|
||||||
|
resolvePhaseRenderer?.render(anonymousInitializer)
|
||||||
print("init")
|
print("init")
|
||||||
bodyRenderer?.renderBody(anonymousInitializer.body)
|
bodyRenderer?.renderBody(anonymousInitializer.body)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitDanglingModifierList(danglingModifierList: FirDanglingModifierList) {
|
override fun visitDanglingModifierList(danglingModifierList: FirDanglingModifierList) {
|
||||||
|
resolvePhaseRenderer?.render(danglingModifierList)
|
||||||
annotationRenderer?.render(danglingModifierList)
|
annotationRenderer?.render(danglingModifierList)
|
||||||
print("<DANGLING MODIFIER: ${danglingModifierList.diagnostic.reason}>")
|
print("<DANGLING MODIFIER: ${danglingModifierList.diagnostic.reason}>")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user