[IR] Pass class Type Parameters into IrConstructorCall factory explicitly

to avoid unexpected crash on uninitialized parent in psi2ir phase
This commit is contained in:
Roman Artemev
2019-10-22 17:28:57 +03:00
committed by romanart
parent ba373c67d7
commit b391c066d6
11 changed files with 38 additions and 29 deletions
@@ -65,7 +65,7 @@ class SerializableCompanionIrGenerator(
val annotationType = compilerContext.externalSymbols.referenceClass(annotationMarkerClass).owner.defaultType
val irSerializableClass = compilerContext.externalSymbols.referenceClass(serializableDescriptor).owner
val annotationCtorCall = IrConstructorCallImpl.fromSymbolOwner(startOffset, endOffset, annotationType, annotationCtor).apply {
val annotationCtorCall = IrConstructorCallImpl.fromSymbolOwner(startOffset, endOffset, annotationType, annotationCtor, annotationMarkerClass.declaredTypeParameters.size).apply {
val serializerType = serializer.toSimpleType(false)
putValueArgument(
0,