Skip to content

Commit

Permalink
chore: added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Sep 5, 2024
1 parent 7797e91 commit 98de809
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/code/alias_1.23.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import (
// Unalias unwraps an alias type
func Unalias(t types.Type) types.Type {
if p, ok := t.(*types.Pointer); ok {
// If the type come from auto-binding,
// it will be a pointer to an alias type.
// (e.g: `type Cursor = entgql.Cursor[int]`)
// *ent.Cursor is the type we got from auto-binding.
return types.NewPointer(Unalias(p.Elem()))
}
return types.Unalias(t)
Expand Down

0 comments on commit 98de809

Please sign in to comment.