FIR: leave 'isSuspend' in functional & resolved type references only

This commit is contained in:
Mikhail Glukhikh
2020-04-20 16:22:12 +03:00
parent 96d8b0bea3
commit 29114fe7b5
27 changed files with 26 additions and 47 deletions
@@ -399,23 +399,12 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
useTypes(errorTypeRefImpl)
}
impl(dynamicTypeRef) {
defaultFalse("isSuspend")
}
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(functionTypeRef)
impl(implicitTypeRef) {
defaultEmptyList("annotations")
defaultFalse("isSuspend")
}
impl(composedSuperTypeRef) {
defaultFalse("isSuspend")
}
impl(composedSuperTypeRef)
impl(reference, "FirStubReference") {
default("source") {
@@ -466,7 +455,6 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
delegate = "typeRef"
}
}
defaultFalse("isSuspend")
}
noImpl(userTypeRef)
@@ -530,12 +530,12 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
typeRef.configure {
+annotations
+booleanField("isSuspend")
}
resolvedTypeRef.configure {
+field("type", coneKotlinTypeType)
+field("delegatedTypeRef", typeRef, nullable = true)
+booleanField("isSuspend")
}
delegatedTypeRef.configure {
@@ -555,6 +555,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
+field("receiverTypeRef", typeRef, nullable = true)
+valueParameters
+returnTypeRef
+booleanField("isSuspend")
}
composedSuperTypeRef.configure {