Minor, take String instead of Name in IrFunction.addValueParameter

All call sites of this method construct parameters with the given string
literal name (and more such call sites are coming in subsequent commits)
and it feels like a boilerplate to wrap it into Name each time manually
This commit is contained in:
Alexander Udalov
2019-03-27 16:15:09 +01:00
parent 4cb5a4fb6d
commit 15928c5b46
3 changed files with 17 additions and 17 deletions
@@ -113,9 +113,9 @@ inline fun IrFunction.addValueParameter(b: IrValueParameterBuilder.() -> Unit):
}
}
fun IrFunction.addValueParameter(name: Name, type: IrType, origin: IrDeclarationOrigin): IrValueParameter =
fun IrFunction.addValueParameter(name: String, type: IrType, origin: IrDeclarationOrigin): IrValueParameter =
addValueParameter {
this.name = name
this.name = Name.identifier(name)
this.type = type
this.origin = origin
}
}