Skip to content

Commit

Permalink
Fix copying user functions (#366)
Browse files Browse the repository at this point in the history
* fix copying user functions

Fixes #365

* remove EncodingId

Co-authored-by: Józef Sokołowski <[email protected]>
  • Loading branch information
qzb and Józef Sokołowski authored Feb 8, 2022
1 parent 7b5d207 commit 0afdfde
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -1577,9 +1577,8 @@ func (o *Undefined) Value() Object {
// UserFunction represents a user function.
type UserFunction struct {
ObjectImpl
Name string
Value CallableFunc
EncodingID string
Name string
Value CallableFunc
}

// TypeName returns the name of the type.
Expand All @@ -1593,7 +1592,7 @@ func (o *UserFunction) String() string {

// Copy returns a copy of the type.
func (o *UserFunction) Copy() Object {
return &UserFunction{Value: o.Value}
return &UserFunction{Value: o.Value, Name: o.Name}
}

// Equals returns true if the value of the type is equal to the value of
Expand Down

0 comments on commit 0afdfde

Please sign in to comment.