Skip to content

Commit 8b03553

Browse files
authored
Issue: 4453 Add support for Go 1.24's Generic Type Aliases (#4454)
1 parent f15c515 commit 8b03553

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

golang/GoParser.g4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
[The "BSD licence"] Copyright (c) 2017 Sasa Coh, Michał Błotniak
3-
Copyright (c) 2019 Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies
4-
Copyright (c) 2019 Dmitry Rassadin, flipparassa@gmail.com,Positive Technologies All rights reserved.
3+
Copyright (c) 2019 Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies
4+
Copyright (c) 2019 Dmitry Rassadin, flipparassa@gmail.com,Positive Technologies All rights reserved.
55
Copyright (c) 2021 Martin Mirchev, mirchevmartin2203@gmail.com
66
Copyright (c) 2023 Dmitry Litovchenko, i@dlitovchenko.ru
77
@@ -97,7 +97,7 @@ typeSpec
9797
;
9898

9999
aliasDecl
100-
: IDENTIFIER ASSIGN type_
100+
: IDENTIFIER typeParameters? ASSIGN type_
101101
;
102102

103103
typeDef

golang/examples/genericTypeAlias.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package mypkg
2+
3+
import "path/to/theirpkg"
4+
5+
type Container[T any] = theirpkg.Container[T]

0 commit comments

Comments
 (0)