mirror of
https://github.com/golang/go
synced 2024-09-05 07:54:46 +00:00
![Shenghou Ma](/assets/img/avatar_default.png)
Fixes #9738. Change-Id: Iab75de2d78335d4e31c3dce6a0e1826d8cddf5f3 Reviewed-on: https://go-review.googlesource.com/3690 Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
21 lines
302 B
Go
21 lines
302 B
Go
// run
|
|
|
|
// Copyright 2015 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
|
|
|
|
func F() (x int) {
|
|
defer func() {
|
|
if x != 42 {
|
|
println("BUG: x =", x)
|
|
}
|
|
}()
|
|
return 42
|
|
}
|
|
|
|
func main() {
|
|
F()
|
|
}
|