| 1 |
// run |
| 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 |
|
| 9 |
func panic1(s string) bool { |
| 10 |
panic(s); |
| 11 |
} |
| 12 |
|
| 13 |
func main() { |
| 14 |
x := false && panic1("first") && panic1("second"); |
| 15 |
x = x == true && panic1("first") && panic1("second"); |
| 16 |
} |
| 17 |
|
| 18 |
/* |
| 19 |
; 6.out |
| 20 |
second |
| 21 |
panic PC=0x250f98 |
| 22 |
main·panic1+0x36 /Users/rsc/goX/test/bugs/bug142.go:6 |
| 23 |
main·panic1(0xae30, 0x0) |
| 24 |
main·main+0x23 /Users/rsc/goX/test/bugs/bug142.go:10 |
| 25 |
main·main() |
| 26 |
mainstart+0xf /Users/rsc/goX/src/runtime/amd64/asm.s:53 |
| 27 |
mainstart() |
| 28 |
sys·Goexit /Users/rsc/goX/src/runtime/proc.c:124 |
| 29 |
sys·Goexit() |
| 30 |
; |
| 31 |
*/ |