blob: 0648c77e7d8570372f9644fac6e15b0446d2d92b [file] [log] [blame]
Brad Fitzpatricke014cf02012-02-24 13:17:26 +11001// cmpout
Stephen Mab4bb9702011-06-13 22:50:51 +10002
Emmanuel Odeke53fd5222016-04-10 14:32:26 -07003// Copyright 2011 The Go Authors. All rights reserved.
Stephen Mab4bb9702011-06-13 22:50:51 +10004// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
Rob Pike83976e32012-02-19 14:28:53 +11007// Test that println can be the target of a go statement.
8
Stephen Mab4bb9702011-06-13 22:50:51 +10009package main
10
Richard Millera25e3682016-04-06 18:42:14 +010011import (
12 "runtime"
13 "time"
14)
Stephen Mab4bb9702011-06-13 22:50:51 +100015
16func main() {
17 go println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255))
Richard Millera25e3682016-04-06 18:42:14 +010018 for runtime.NumGoroutine() > 1 {
19 time.Sleep(10*time.Millisecond)
20 }
Stephen Mab4bb9702011-06-13 22:50:51 +100021}