2008-10-03 18:06:24 -06:00
|
|
|
// $G $D/$F.go && $L $F.$A || echo BUG: const bug
|
|
|
|
|
|
|
|
// Copyright 2009 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
|
|
|
|
|
2009-01-16 17:12:14 -07:00
|
|
|
const a = 0
|
2008-10-03 18:06:24 -06:00
|
|
|
|
|
|
|
func f() {
|
2009-01-16 17:12:14 -07:00
|
|
|
const a = 5
|
2008-10-03 18:06:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2009-01-16 17:12:14 -07:00
|
|
|
if a != 0 {
|
2010-03-30 11:34:57 -06:00
|
|
|
println("a=", a)
|
|
|
|
panic("fail")
|
2008-10-03 18:06:24 -06:00
|
|
|
}
|
|
|
|
}
|