diff options
author | Keith Randall <khr@golang.org> | 2017-09-08 11:47:16 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2017-09-08 20:10:48 +0000 |
commit | 02deb77f6db19f5894d836790a64bd4dea86feb0 (patch) | |
tree | cef5c833e22ba82b8e6784a8b4bd4c7aafefe12a /test/fixedbugs/issue21808.go | |
parent | 87dae58662c78c772cb210d685b354ae6916ef2d (diff) | |
download | go-git-02deb77f6db19f5894d836790a64bd4dea86feb0.tar.gz |
cmd/compile: fix println()
println with no arguments accidentally doesn't print a newline.
Introduced at CL 55097
Fixes #21808
Change-Id: I9fc7b4271b9b31e4c9b6078f055195dc3907b62c
Reviewed-on: https://go-review.googlesource.com/62390
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'test/fixedbugs/issue21808.go')
-rw-r--r-- | test/fixedbugs/issue21808.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/fixedbugs/issue21808.go b/test/fixedbugs/issue21808.go new file mode 100644 index 0000000000..d146200eae --- /dev/null +++ b/test/fixedbugs/issue21808.go @@ -0,0 +1,17 @@ +// run + +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Make sure println() prints a blank line. + +package main + +import "fmt" + +func main() { + fmt.Println("A") + println() + fmt.Println("B") +} |