Initial commit: Go 1.23 release state
This commit is contained in:
12
test/fixedbugs/issue4326.dir/p1.go
Normal file
12
test/fixedbugs/issue4326.dir/p1.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package p1
|
||||
|
||||
type O map[string]map[string]string
|
||||
|
||||
func (opts O) RemoveOption(sect, opt string) bool {
|
||||
if _, ok := opts[sect]; !ok {
|
||||
return false
|
||||
}
|
||||
_, ok := opts[sect][opt]
|
||||
delete(opts[sect], opt)
|
||||
return ok
|
||||
}
|
||||
5
test/fixedbugs/issue4326.dir/p2.go
Normal file
5
test/fixedbugs/issue4326.dir/p2.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package p2
|
||||
|
||||
import "./p1"
|
||||
|
||||
func NewO() p1.O { return nil }
|
||||
8
test/fixedbugs/issue4326.dir/q1.go
Normal file
8
test/fixedbugs/issue4326.dir/q1.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package q1
|
||||
|
||||
func Deref(typ interface{}) interface{} {
|
||||
if typ, ok := typ.(*int); ok {
|
||||
return *typ
|
||||
}
|
||||
return typ
|
||||
}
|
||||
11
test/fixedbugs/issue4326.dir/q2.go
Normal file
11
test/fixedbugs/issue4326.dir/q2.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import "./q1"
|
||||
|
||||
func main() {
|
||||
x := 1
|
||||
y := q1.Deref(&x)
|
||||
if y != 1 {
|
||||
panic("y != 1")
|
||||
}
|
||||
}
|
||||
7
test/fixedbugs/issue4326.dir/z.go
Normal file
7
test/fixedbugs/issue4326.dir/z.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package z
|
||||
|
||||
import "./p2"
|
||||
|
||||
func main() {
|
||||
p2.NewO().RemoveOption("hello", "world")
|
||||
}
|
||||
Reference in New Issue
Block a user