diff options
author | Russ Cox <rsc@golang.org> | 2010-01-27 15:37:08 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-01-27 15:37:08 -0800 |
commit | a186b77b038ba7e185129253d5a1e283682e9421 (patch) | |
tree | e0f76dda5ae72abb5e6f1f419af2d059906193d8 /test/deferprint.go | |
parent | 22a4952bd2dbafb2eda36bfb51bbc4cbda5e564e (diff) | |
download | go-a186b77b038ba7e185129253d5a1e283682e9421.tar.gz go-a186b77b038ba7e185129253d5a1e283682e9421.zip |
gc: implement defer print/println/panic/panicln
Fixes #219.
R=ken2, r
CC=golang-dev
https://golang.org/cl/194097
Diffstat (limited to 'test/deferprint.go')
-rw-r--r-- | test/deferprint.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/deferprint.go b/test/deferprint.go new file mode 100644 index 0000000000..f1e75266f7 --- /dev/null +++ b/test/deferprint.go @@ -0,0 +1,14 @@ +// $G $D/$F.go && $L $F.$A && ./$A.out + +// Copyright 2010 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. + +package main + +func main() { + defer println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255)) + defer println(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) +// defer panic("dead") + defer print("printing: ") +} |