OLD | NEW |
1 // $G $D/$F.go && $L $F.$A && ./$A.out | 1 // $G $D/$F.go && $L $F.$A && ./$A.out |
2 | 2 |
3 // Copyright 2009 The Go Authors. All rights reserved. | 3 // Copyright 2009 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 package main | 7 package main |
8 | 8 |
9 type S string | 9 type S string |
10 type S1 string | 10 type S1 string |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 if Val.val(i) != 3 { | 118 if Val.val(i) != 3 { |
119 println("Val.val(i):", Val.val(i)) | 119 println("Val.val(i):", Val.val(i)) |
120 panic("fail") | 120 panic("fail") |
121 } | 121 } |
122 v = i | 122 v = i |
123 if Val.val(v) != 3 { | 123 if Val.val(v) != 3 { |
124 println("Val.val(v):", Val.val(v)) | 124 println("Val.val(v):", Val.val(v)) |
125 panic("fail") | 125 panic("fail") |
126 } | 126 } |
127 pv := &v | |
128 if pv.val() != 3 { | |
129 println("pv.val():", pv.val()) | |
130 panic("fail") | |
131 } | |
132 } | 127 } |
OLD | NEW |