Closed
Description
Description
Sometimes we need to render some expression with string interpolation. There is no support for it now.
It will be useful. for example, to assert failures with informative messages. Something like this
fail("Informative message with variables from generated code")
Expected behavior
In Kotlin it should be rendered like this
"An overflow error occurred in ${method.name} call with arguments ${first.name} ${first.value}, ${second.name} ${second.value}"
In Java it is a little bit complicated
String.format("An overflow error occured in %s call with arguments %s %s, %s %s", method.name, first.name, first.value, second.name, second.value)
Here we need to think about the modifiers for complex types
Potential alternatives
This examples are just a proposal, we may introduce another approach.
Context
There are not specific Cg items for this. We need to introduce them.
Metadata
Metadata
Assignees
Type
Projects
Status
Done