| // Copyright 2011 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. |
| // Test len constants and non-constants, http://golang.org/issue/3244. |
| // Non-constants (see also const5.go). |
| var c = func() chan *[50]int { |
| c := make(chan *[50]int, 2) |
| var c1 = func() chan *[70]int { |
| c := make(chan *[70]int, 2) |
| if n1 != 10 || n2 != 20 || n3 != 30 || n4 != 40 || n5 != 50 || n6 != 60 || n7 != 70 { |
| println("BUG:", n1, n2, n3, n4, n5, n6, n7) |
| println("BUG: did not call f") |
| println("BUG: did not receive from c") |
| println("BUG: did not call g") |
| println("BUG: did not receive from c1") |