1// run 2 3// Copyright 2014 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 9var a = 1 10 11func main() { 12 defer func() { 13 recover() 14 if a != 2 { 15 println("BUG a =", a) 16 } 17 }() 18 a = 2 19 b := a - a 20 c := 4 21 a = c / b 22 a = 3 23} 24