From 984a11995af26a039567579037a1eec49d54504e Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 20 Feb 2020 14:09:00 +0300 Subject: [PATCH] FIR2IR: pre-cache type parameters before property creation Type parameters can be referred from e.g. property accessors, so we should determine them earlier to be able to set their indexes --- .../org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index 76a958b75bb..ab65198637e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -660,6 +660,7 @@ class Fir2IrDeclarationStorage( return propertyCache.getOrPut(property) { val containerSource = property.containerSource val descriptor = containerSource?.let { WrappedPropertyDescriptorWithContainerSource(it) } ?: WrappedPropertyDescriptor() + preCacheTypeParameters(property) property.convertWithOffsets { startOffset, endOffset -> enterScope(descriptor) val result = irSymbolTable.declareProperty(