fix newline being added when using print with int
parent
0963328aed
commit
b4bf12378e
|
@ -911,7 +911,8 @@ fn (p mut Parser) fn_call_args(f mut Fn) &Fn {
|
||||||
$if !js {
|
$if !js {
|
||||||
fmt := p.typ_to_fmt(typ, 0)
|
fmt := p.typ_to_fmt(typ, 0)
|
||||||
if fmt != '' {
|
if fmt != '' {
|
||||||
p.cgen.resetln(p.cgen.cur_line.replace(f.name + ' (', '/*opt*/printf ("' + fmt + '\\n", '))
|
nl := if f.name == 'println' { '\\n' } else { '' }
|
||||||
|
p.cgen.resetln(p.cgen.cur_line.replace(f.name + ' (', '/*opt*/printf ("' + fmt + '$nl", '))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue