通过刚才的测试
发现 goland 对泛型支持有 bug ,能正常编译的代码报错,先降回 1.17 了
复现代码

package main

import "fmt"

type G[T any] struct {
	Data []T
}

type D = G[int] // <- type alias or type definition both can trigger this bug.

func main() {
	g := D{
		Data: make([]int, 0), // goland will report a type error here.
	}
	fmt.Println(g)
}