Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alias types in typeIdentical() #478

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/xtypes/xtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@
case *typeparams.TypeParam:
// nothing to do (x and y being equal is caught in the very beginning of this function)

case *types.Alias:
// an alias type is identical if the type it's an alias of is identical to it.
return typeIdentical(x.Rhs(), y, p)

Check failure on line 226 in internal/xtypes/xtypes.go

View workflow job for this annotation

GitHub Actions / Build (oldstable)

x.Rhs undefined (type *types.Alias has no field or method Rhs) (typecheck)

Check failure on line 226 in internal/xtypes/xtypes.go

View workflow job for this annotation

GitHub Actions / Build (oldstable)

x.Rhs undefined (type *types.Alias has no field or method Rhs)) (typecheck)

Check failure on line 226 in internal/xtypes/xtypes.go

View workflow job for this annotation

GitHub Actions / Build (oldstable)

x.Rhs undefined (type *types.Alias has no field or method Rhs)) (typecheck)

case nil:
// avoid a crash in case of nil type

Expand Down
Loading