Rémy Oudompheng | fc3797a | 2012-02-22 00:19:59 +0100 | [diff] [blame] | 1 | // build |
Russ Cox | 7766b12 | 2008-10-03 17:06:24 -0700 | [diff] [blame] | 2 | |
| 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 | |
| 7 | package main |
| 8 | |
Russ Cox | f48cbfd | 2009-01-16 16:12:14 -0800 | [diff] [blame] | 9 | const a = 0 |
Russ Cox | 7766b12 | 2008-10-03 17:06:24 -0700 | [diff] [blame] | 10 | |
| 11 | func f() { |
Russ Cox | f48cbfd | 2009-01-16 16:12:14 -0800 | [diff] [blame] | 12 | const a = 5 |
Russ Cox | 7766b12 | 2008-10-03 17:06:24 -0700 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | func main() { |
Russ Cox | f48cbfd | 2009-01-16 16:12:14 -0800 | [diff] [blame] | 16 | if a != 0 { |
Russ Cox | 00f9f0c | 2010-03-30 10:34:57 -0700 | [diff] [blame] | 17 | println("a=", a) |
| 18 | panic("fail") |
Russ Cox | 7766b12 | 2008-10-03 17:06:24 -0700 | [diff] [blame] | 19 | } |
| 20 | } |