aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata
diff options
context:
space:
mode:
authorFederico G. Schwindt <[email protected]>2022-06-22 05:21:56 -0600
committerRon Evans <[email protected]>2022-07-13 14:44:23 +0200
commitea36fea5a9382589a31e35e6a12b56f3bea290c7 (patch)
treed19e0b9b5596afc9e9d9b86a16fdb28fa784a3ed /testdata
parent5fdb894760fc0d2f0bde90076992f7ae90bd8239 (diff)
downloadtinygo-ea36fea5a9382589a31e35e6a12b56f3bea290c7.tar.gz
tinygo-ea36fea5a9382589a31e35e6a12b56f3bea290c7.zip
Add support for printing slices via print/println
With help from @aykevl.
Diffstat (limited to 'testdata')
-rw-r--r--testdata/print.go4
-rw-r--r--testdata/print.txt2
2 files changed, 6 insertions, 0 deletions
diff --git a/testdata/print.go b/testdata/print.go
index 2b5f0a093..7f7f843c4 100644
--- a/testdata/print.go
+++ b/testdata/print.go
@@ -45,4 +45,8 @@ func main() {
// print bool
println(true, false)
+
+ // print slice
+ println([]byte(nil))
+ println([]int(nil))
}
diff --git a/testdata/print.txt b/testdata/print.txt
index 372eda959..116de945d 100644
--- a/testdata/print.txt
+++ b/testdata/print.txt
@@ -21,3 +21,5 @@ a b c
(0:nil)
map[2]
true false
+[0/0]nil
+[0/0]nil