We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3d6480 commit d97cda7Copy full SHA for d97cda7
go/ql/test/library-tests/semmle/go/Types/aliases.go
@@ -25,3 +25,14 @@ type T = S3
25
func H(Afs3 T) int {
26
return Afs3.x
27
}
28
+
29
+type MyType[MyTypeT any] struct{ x MyTypeT }
30
31
+// An alias with a type parameter - added in Go 1.24
32
+type MyTypeAlias[MyTypeAliasT any] = MyType[MyTypeAliasT]
33
34
+func useMyTypeAlias(a MyTypeAlias[string]) string {
35
+ b := MyTypeAlias[string]{x: "hello"}
36
+ a.x = b.x
37
+ return a.x
38
+}
go/ql/test/library-tests/semmle/go/Types/go.mod
@@ -1,3 +1,3 @@
1
module codeql-go-types
2
3
-go 1.23
+go 1.24
0 commit comments