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 | 2a2192d0ae231d582b9170aff8ce96408d86d871 (patch) | |
tree | 2157d049caabfff106c8332928c45715ab2b243c /test/deferprint.go | |
parent | 07f9540f896b848c960fa5b05e76bc48e971efb2 (diff) | |
download | go-2a2192d0ae231d582b9170aff8ce96408d86d871.tar.gz |
gc: implement defer print/println/panic/panicln
Fixes issue 219.
R=ken2, r
CC=golang-dev
http://codereview.appspot.com/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 000000000..f1e75266f --- /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: ") +} |