Hi community,
We have some code that works fine in Go 1.22, but throws a compiler error in Go 1.23.
We've recreated the issue with a simple example:
```
package main
import (
"fmt"
)
type A = []string
func m[T ~A](a T) {
fmt.Println(a[0])
}
func main() {
b := []string{"value"}
m[A](b)
}
```
This runs fine in Go 1.22, but throws this error in Go 1.23:
./prog.go:10:15: invalid operation: cannot index a (variable of type T constrained by ~A)
We see something similar with maps.
Is this a compiler bug?
We've noticed that if we move the type definition of A to a package then it's fine in Go 1.23. Here's an example in Go playground:
https://go.dev/play/p/l_x4F190M3yThanks,
Peter