blob: 5528ba3f16d39b40b72b858c7ef1d37eedfa897f [file] [log] [blame]
Rémy Oudomphengfc3797a2012-02-22 00:19:59 +01001// build
Russ Cox7766b122008-10-03 17:06:24 -07002
3// Copyright 2009 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
Russ Coxf48cbfd2009-01-16 16:12:14 -08009const a = 0
Russ Cox7766b122008-10-03 17:06:24 -070010
11func f() {
Russ Coxf48cbfd2009-01-16 16:12:14 -080012 const a = 5
Russ Cox7766b122008-10-03 17:06:24 -070013}
14
15func main() {
Russ Coxf48cbfd2009-01-16 16:12:14 -080016 if a != 0 {
Russ Cox00f9f0c2010-03-30 10:34:57 -070017 println("a=", a)
18 panic("fail")
Russ Cox7766b122008-10-03 17:06:24 -070019 }
20}