Skip to content

Commit

Permalink
[release-branch.go1.23] cmd/compile: support generic alias type
Browse files Browse the repository at this point in the history
Type parameters on aliases are now allowed after golang#46477 accepted.

Updates golang#46477
Fixes golang#68054

Change-Id: Ic2e3b6f960a898163f47666e3a6bfe43b8cc22e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/593715
Reviewed-by: Robert Griesemer <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Robert Griesemer <[email protected]>
Reviewed-on: https://go-review.googlesource.com/c/go/+/593797
Reviewed-by: Michael Pratt <[email protected]>
  • Loading branch information
cuonglm authored and xiandaonancheng committed Sep 12, 2024
1 parent 8e46057 commit 5665802
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/compile/internal/noder/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,9 @@ func objTypeParams(obj types2.Object) *types2.TypeParamList {
case *types2.Alias:
return t.TypeParams()
}
if alias, ok := obj.Type().(*types2.Alias); ok {
return alias.TypeParams()
}
}
return nil
}
Expand Down

0 comments on commit 5665802

Please sign in to comment.