Skip to content

Commit

Permalink
Use Type.Array() to check if the type is array-like.
Browse files Browse the repository at this point in the history
  • Loading branch information
markkurossi committed Oct 23, 2024
1 parent 21f10a8 commit 8a4e258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (i *Info) Instantiate(o Info) bool {
return true

case TPtr:
if o.ElementType.Type != TArray {
if !o.ElementType.Type.Array() {
return false
}
// Instantiating array from pointer to array
Expand All @@ -272,7 +272,7 @@ func (i *Info) Instantiate(o Info) bool {
// Instantiating slice from an array. Continue below.

case TPtr:
if o.ElementType.Type != TArray {
if !o.ElementType.Type.Array() {
return false
}
// Instantiating slice from pointer to array
Expand Down

0 comments on commit 8a4e258

Please sign in to comment.