FIR: record 'suspend' function modifier in type references
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bf97391c51
commit
88f81b9b71
+1
@@ -232,6 +232,7 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
||||
}
|
||||
|
||||
builder(resolvedTypeRef) {
|
||||
defaultFalse("isSuspend")
|
||||
defaultNull("delegatedTypeRef")
|
||||
}
|
||||
|
||||
|
||||
+17
-4
@@ -376,6 +376,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
withGetter = true
|
||||
}
|
||||
default("annotations", "mutableListOf()")
|
||||
defaultFalse("isSuspend")
|
||||
useTypes(coneClassErrorTypeType)
|
||||
}
|
||||
|
||||
@@ -398,12 +399,23 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
useTypes(errorTypeRefImpl)
|
||||
}
|
||||
|
||||
impl(functionTypeRef)
|
||||
impl(implicitTypeRef) {
|
||||
defaultEmptyList("annotations")
|
||||
impl(dynamicTypeRef) {
|
||||
defaultFalse("isSuspend")
|
||||
}
|
||||
|
||||
impl(composedSuperTypeRef)
|
||||
impl(functionTypeRef) {
|
||||
// Note that we intentionally do _not_ set default value (false) for `isSuspend`, since function type reference is the only
|
||||
// place where type modifier `suspend` matters.
|
||||
}
|
||||
|
||||
impl(implicitTypeRef) {
|
||||
defaultEmptyList("annotations")
|
||||
defaultFalse("isSuspend")
|
||||
}
|
||||
|
||||
impl(composedSuperTypeRef) {
|
||||
defaultFalse("isSuspend")
|
||||
}
|
||||
|
||||
impl(reference, "FirStubReference") {
|
||||
default("source") {
|
||||
@@ -454,6 +466,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
delegate = "typeRef"
|
||||
}
|
||||
}
|
||||
defaultFalse("isSuspend")
|
||||
}
|
||||
|
||||
noImpl(userTypeRef)
|
||||
|
||||
+1
@@ -530,6 +530,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
|
||||
typeRef.configure {
|
||||
+annotations
|
||||
+booleanField("isSuspend")
|
||||
}
|
||||
|
||||
resolvedTypeRef.configure {
|
||||
|
||||
Reference in New Issue
Block a user