Skip to content

Commit

Permalink
fix: correct issue with detecting native type when it's a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
tucats committed Dec 24, 2024
1 parent 09a6012 commit 7674b0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions builtins/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func typeOf(s *symbols.SymbolTable, args data.List) (interface{}, error) {
default:
// Can we find if this is a package type?
typeName := reflect.TypeOf(v).String()
if strings.HasPrefix(typeName, "*") {
typeName = typeName[1:] // remove the '*'
}

if parts := strings.Split(typeName, "."); len(parts) == 2 {
if pkgData, found := s.Get(parts[0]); found {
if pkg, ok := pkgData.(*data.Package); ok {
Expand Down
2 changes: 1 addition & 1 deletion tools/buildver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5-1172
1.5-1173

0 comments on commit 7674b0f

Please sign in to comment.