Initial commit: Go 1.23 release state
This commit is contained in:
28
test/fixedbugs/issue3552.dir/one.go
Normal file
28
test/fixedbugs/issue3552.dir/one.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2012 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 one
|
||||
|
||||
// Issue 3552
|
||||
|
||||
type T struct { int }
|
||||
|
||||
func (t T) F() int { return t.int }
|
||||
|
||||
type U struct { int int }
|
||||
|
||||
func (u U) F() int { return u.int }
|
||||
|
||||
type lint int
|
||||
|
||||
type V struct { lint }
|
||||
|
||||
func (v V) F() int { return int(v.lint) }
|
||||
|
||||
type W struct { lint lint }
|
||||
|
||||
func (w W) F() int { return int(w.lint) }
|
||||
|
||||
|
||||
|
||||
22
test/fixedbugs/issue3552.dir/two.go
Normal file
22
test/fixedbugs/issue3552.dir/two.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright 2012 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.
|
||||
|
||||
// Use the functions in one.go so that the inlined
|
||||
// forms get type-checked.
|
||||
|
||||
package two
|
||||
|
||||
import "./one"
|
||||
|
||||
func use() {
|
||||
var t one.T
|
||||
var u one.U
|
||||
var v one.V
|
||||
var w one.W
|
||||
|
||||
_ = t.F()
|
||||
_ = u.F()
|
||||
_ = v.F()
|
||||
_ = w.F()
|
||||
}
|
||||
Reference in New Issue
Block a user