diff options
Diffstat (limited to 'misc/cgo/testshared/testdata/issue47837')
-rw-r--r-- | misc/cgo/testshared/testdata/issue47837/a/a.go | 19 | ||||
-rw-r--r-- | misc/cgo/testshared/testdata/issue47837/main/main.go | 14 |
2 files changed, 33 insertions, 0 deletions
diff --git a/misc/cgo/testshared/testdata/issue47837/a/a.go b/misc/cgo/testshared/testdata/issue47837/a/a.go new file mode 100644 index 0000000..68588ed --- /dev/null +++ b/misc/cgo/testshared/testdata/issue47837/a/a.go @@ -0,0 +1,19 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package a + +type A interface { + M() +} + +//go:noinline +func TheFuncWithArgA(a A) { + a.M() +} + +type ImplA struct{} + +//go:noinline +func (A *ImplA) M() {} diff --git a/misc/cgo/testshared/testdata/issue47837/main/main.go b/misc/cgo/testshared/testdata/issue47837/main/main.go new file mode 100644 index 0000000..77c6f34 --- /dev/null +++ b/misc/cgo/testshared/testdata/issue47837/main/main.go @@ -0,0 +1,14 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "testshared/issue47837/a" +) + +func main() { + var vara a.ImplA + a.TheFuncWithArgA(&vara) +} |