modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/issue4932.dir/state.go (about) 1 // Copyright 2013 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 state 6 7 import "./foo" 8 9 func Public() { 10 var s Settings 11 s.op() 12 } 13 14 type State struct{} 15 16 func (s *State) x(*Settings) {} 17 18 type Settings struct{} 19 20 func (c *Settings) x() { 21 run([]foo.Op{{}}) 22 } 23 24 func run([]foo.Op) {} 25 26 func (s *Settings) op() foo.Op { 27 return foo.Op{} 28 }