[JVM IR] Fix issue with destructuring declaration in parameter for

suspend lambda.

The Name for the special destructuring declaration parameter was
incorrectly turned into a regular/non-special Name when the parameter
was moved to a field.
This commit is contained in:
Mark Punzalan
2020-01-07 14:20:35 -08:00
committed by Ilmir Usmanov
parent 36c4df6d99
commit 137ef26723
4 changed files with 6 additions and 5 deletions
@@ -63,13 +63,16 @@ inline fun IrDeclarationContainer.addField(builder: IrFieldBuilder.() -> Unit) =
declarations.add(field)
}
fun IrClass.addField(fieldName: String, fieldType: IrType, fieldVisibility: Visibility = Visibilities.PRIVATE): IrField =
fun IrClass.addField(fieldName: Name, fieldType: IrType, fieldVisibility: Visibility = Visibilities.PRIVATE): IrField =
addField {
name = Name.identifier(fieldName)
name = fieldName
type = fieldType
visibility = fieldVisibility
}
fun IrClass.addField(fieldName: String, fieldType: IrType, fieldVisibility: Visibility = Visibilities.PRIVATE): IrField =
addField(Name.identifier(fieldName), fieldType, fieldVisibility)
fun IrPropertyBuilder.buildProperty(): IrProperty {
val wrappedDescriptor = WrappedPropertyDescriptor()
return IrPropertyImpl(