Skip to content

Commit 9214dcf

Browse files
committed
Mirror Go's println behavior
1 parent e45a75c commit 9214dcf

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

gnovm/pkg/gnolang/native_perf_and_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestGnoPrintAndPrintln(t *testing.T) {
8989
{
9090
"println with no args",
9191
"println()",
92-
"",
92+
"\n",
9393
},
9494
{
9595
"print with 1 arg",

gnovm/pkg/gnolang/uverse.go

-4
Original file line numberDiff line numberDiff line change
@@ -756,10 +756,6 @@ func makeUverseNode() {
756756
arg0 := m.LastBlock().GetParams1()
757757
xv := arg0
758758
xvl := xv.TV.GetLength()
759-
if xvl == 0 {
760-
// Mimick Go in which invoking println() does nothing.
761-
return
762-
}
763759

764760
switch debug {
765761
case true:

0 commit comments

Comments
 (0)