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
This commit is contained in:
Mikhail Glukhikh
2020-02-20 14:09:00 +03:00
parent a3f676317f
commit 984a11995a
@@ -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(