operator-unset.go: fixed function removal
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ func deleteContextItem(ctx ExprContext, opTerm *term, item any) (deleted bool, e
|
||||
var size int
|
||||
if strings.HasSuffix(name, "()") {
|
||||
size = ctx.FuncCount()
|
||||
ctx.DeleteVar(strings.TrimRight(name, "()"))
|
||||
ctx.DeleteFunc(strings.TrimRight(name, "()"))
|
||||
deleted = ctx.FuncCount() < size
|
||||
} else {
|
||||
size = ctx.VarCount()
|
||||
|
||||
Reference in New Issue
Block a user