FIR2IR: determine type parameters before class super types
Type parameters can be referred from type arguments of super types, so we should determine them earlier to be able to set their indexes
This commit is contained in:
+3
-3
@@ -151,12 +151,12 @@ class Fir2IrDeclarationStorage(
|
||||
}
|
||||
|
||||
private fun IrClass.declareSupertypesAndTypeParameters(klass: FirClass<*>): IrClass {
|
||||
superTypes = klass.superTypeRefs.map { superTypeRef ->
|
||||
superTypeRef.toIrType(session, this@Fir2IrDeclarationStorage)
|
||||
}
|
||||
if (klass is FirRegularClass) {
|
||||
setTypeParameters(klass)
|
||||
}
|
||||
superTypes = klass.superTypeRefs.map { superTypeRef ->
|
||||
superTypeRef.toIrType(session, this@Fir2IrDeclarationStorage)
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user