modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/issue9537.dir/a.go (about)

     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  }