Browse Source

compiler: print() doesn't print spaces between arguments

pull/6/head
Ayke van Laethem 6 years ago
parent
commit
81b9edbe65
No known key found for this signature in database GPG Key ID: E97FF5335DFDFDED
  1. 2
      compiler.go

2
compiler.go

@ -1623,7 +1623,7 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
}
case "print", "println":
for i, arg := range args {
if i >= 1 {
if i >= 1 && callName == "println" {
c.builder.CreateCall(c.mod.NamedFunction("runtime.printspace"), nil, "")
}
value, err := c.parseExpr(frame, arg)

Loading…
Cancel
Save