E4096#
String interpolation syntax is not supported for Bytes
.
Only String
supports string interpolation.
Erroneous example#
test {
let x : Int = 42
let _ : Bytes = "(\{x})"
}
Suggestion#
To dynamically create a Bytes
, use @buffer.T
instead:
test {
let x : Int = 42
let buf = @buffer.new()
let _ : Bytes = buf
..write_string("(")
..write_object(x)
..write_string(")")
.to_bytes()
}