Improved closure context persistence. Now it is possibile to define counters like this func(base){func(){@base=base+1}}
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ func dummy(ctx ExprContext, name string, args []any) (result any, err error) {
|
||||
|
||||
func TestFunctionToStringSimple(t *testing.T) {
|
||||
source := NewGolangFunctor(dummy)
|
||||
want := "func() {}"
|
||||
want := "func(){}"
|
||||
got := source.ToString(0)
|
||||
if got != want {
|
||||
t.Errorf(`(func() -> result = %v [%T], want = %v [%T]`, got, got, want, want)
|
||||
|
||||
Reference in New Issue
Block a user