Skip to content

Commit

Permalink
fix dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Feb 2, 2017
1 parent e207bf3 commit 295fa83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ func invokeExpr(expr ast.Expr, env *Env) (reflect.Value, error) {
if v.Kind() != reflect.Ptr {
return NilValue, NewStringError(expr, "Cannot deference for the value")
}
return v.Addr(), nil
return v.Elem(), nil
case *ast.AddrExpr:
v := NilValue
var err error
Expand Down

1 comment on commit 295fa83

@QuestionPython
Copy link

@QuestionPython QuestionPython commented on 295fa83 Feb 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also again have bug, #59

Please sign in to comment.