Initial commit: Go 1.23 release state
This commit is contained in:
23
test/fixedbugs/issue52279.dir/lib.go
Normal file
23
test/fixedbugs/issue52279.dir/lib.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package lib
|
||||
|
||||
type FMap[K comparable, V comparable] map[K]V
|
||||
|
||||
//go:noinline
|
||||
func (m FMap[K, V]) Flip() FMap[V, K] {
|
||||
out := make(FMap[V, K])
|
||||
return out
|
||||
}
|
||||
|
||||
type MyType uint8
|
||||
|
||||
const (
|
||||
FIRST MyType = 0
|
||||
)
|
||||
|
||||
var typeStrs = FMap[MyType, string]{
|
||||
FIRST: "FIRST",
|
||||
}
|
||||
|
||||
func (self MyType) String() string {
|
||||
return typeStrs[self]
|
||||
}
|
||||
5
test/fixedbugs/issue52279.dir/main.go
Normal file
5
test/fixedbugs/issue52279.dir/main.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package main
|
||||
|
||||
import "./lib"
|
||||
|
||||
func main() { lib.FIRST.String() }
|
||||
Reference in New Issue
Block a user