fmt: fix a bug that break generics call in string inter (#11468)
parent
145467050d
commit
fb20a92b1e
|
@ -201,7 +201,7 @@ pub fn (lit &StringInterLiteral) get_fspec_braces(i int) (string, bool) {
|
|||
break
|
||||
}
|
||||
CallExpr {
|
||||
if sub_expr.args.len != 0 {
|
||||
if sub_expr.args.len != 0 || sub_expr.concrete_types.len != 0 {
|
||||
needs_braces = true
|
||||
} else if sub_expr.left is CallExpr {
|
||||
sub_expr = sub_expr.left
|
||||
|
|
|
@ -14,4 +14,6 @@ fn main() {
|
|||
println('(${some_struct.@type}, $some_struct.y)')
|
||||
_ := 'CastExpr ${int(d.e).str()}'
|
||||
println('${f[0..4].bytestr()}')
|
||||
_ := '${generic_fn<int>()}'
|
||||
_ := '${foo.generic_method<int>()}'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue