Initial commit: Go 1.23 release state
This commit is contained in:
33
test/fixedbugs/issue4879.dir/a.go
Normal file
33
test/fixedbugs/issue4879.dir/a.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package a
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type Collection struct {
|
||||
root unsafe.Pointer
|
||||
}
|
||||
|
||||
type nodeLoc struct{}
|
||||
|
||||
type slice []int
|
||||
|
||||
type maptype map[int]int
|
||||
|
||||
func MakePrivateCollection() *Collection {
|
||||
return &Collection{
|
||||
root: unsafe.Pointer(&nodeLoc{}),
|
||||
}
|
||||
}
|
||||
|
||||
func MakePrivateCollection2() *Collection {
|
||||
return &Collection{
|
||||
root: unsafe.Pointer(&slice{}),
|
||||
}
|
||||
}
|
||||
func MakePrivateCollection3() *Collection {
|
||||
return &Collection{
|
||||
root: unsafe.Pointer(&maptype{}),
|
||||
}
|
||||
}
|
||||
|
||||
9
test/fixedbugs/issue4879.dir/b.go
Normal file
9
test/fixedbugs/issue4879.dir/b.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package b
|
||||
|
||||
import "./a"
|
||||
|
||||
func F() {
|
||||
a.MakePrivateCollection()
|
||||
a.MakePrivateCollection2()
|
||||
a.MakePrivateCollection3()
|
||||
}
|
||||
Reference in New Issue
Block a user