test/fixedbugs/issue9537.dir/a.go
raw| 1 | // Copyright 2015 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package a |
| 6 | |
| 7 | type X struct { |
| 8 | T [32]byte |
| 9 | } |
| 10 | |
| 11 | func (x *X) Get() []byte { |
| 12 | t := x.T |
| 13 | return t[:] |
| 14 | } |
| 15 | |
| 16 | func (x *X) RetPtr(i int) *int { |
| 17 | i++ |
| 18 | return &i |
| 19 | } |
| 20 | |
| 21 | func (x *X) RetRPtr(i int) (r1 int, r2 *int) { |
| 22 | r1 = i + 1 |
| 23 | r2 = &r1 |
| 24 | return |
| 25 | } |