LEFT | RIGHT |
(Both sides are equal) |
1 // $G $D/$F.go && $L $F.$A && ./$A.out | 1 // $G $D/$F.go && $L $F.$A && ./$A.out |
2 | 2 |
3 // Copyright 2010 The Go Authors. All rights reserved. | 3 // Copyright 2010 The Go Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
6 | 6 |
7 // Test of recover for run-time errors. | 7 // Test of recover for run-time errors. |
8 | 8 |
9 // TODO(rsc): | 9 // TODO(rsc): |
10 // integer divide by zero? | 10 // integer divide by zero? |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 var z interface{} = x | 77 var z interface{} = x |
78 m := make(map[interface{}]int) | 78 m := make(map[interface{}]int) |
79 m[z] = 1 | 79 m[z] = 1 |
80 } | 80 } |
81 | 81 |
82 func test7() { | 82 func test7() { |
83 defer mustRecover("complex divide by zero") | 83 defer mustRecover("complex divide by zero") |
84 var x, y complex | 84 var x, y complex |
85 println(x / y) | 85 println(x / y) |
86 } | 86 } |
LEFT | RIGHT |