FIR resolve: add early protection against cyclic property resolve

This commit is contained in:
Mikhail Glukhikh
2019-07-15 17:47:38 +03:00
parent 1222449dc8
commit 08f44d4f14
@@ -1051,6 +1051,9 @@ open class FirBodyResolveTransformer(
override fun transformProperty(property: FirProperty, data: Any?): CompositeTransformResult<FirDeclaration> {
val returnTypeRef = property.returnTypeRef
if (returnTypeRef !is FirImplicitTypeRef && implicitTypeOnly) return property.compose()
if (returnTypeRef is FirImplicitTypeRef) {
property.transformReturnTypeRef(StoreType, FirComputingImplicitTypeRef)
}
return withScopeCleanup(localScopes) {
localScopes.addIfNotNull(primaryConstructorParametersScope)
withContainer(property) {