Control vars are now stored in the globalCtx only.
However, it is still allowed to store control var in a local context in special situation
This commit is contained in:
+2
-2
@@ -48,7 +48,7 @@ func newAndTerm(tk *Token) (inst *term) {
|
||||
}
|
||||
|
||||
func evalAnd(ctx ExprContext, self *term) (v any, err error) {
|
||||
if isEnabled(ctx, ControlBoolShortcut) {
|
||||
if CtrlIsEnabled(ctx, ControlBoolShortcut) {
|
||||
v, err = evalAndWithShortcut(ctx, self)
|
||||
} else {
|
||||
v, err = evalAndWithoutShortcut(ctx, self)
|
||||
@@ -117,7 +117,7 @@ func newOrTerm(tk *Token) (inst *term) {
|
||||
}
|
||||
|
||||
func evalOr(ctx ExprContext, self *term) (v any, err error) {
|
||||
if isEnabled(ctx, ControlBoolShortcut) {
|
||||
if CtrlIsEnabled(ctx, ControlBoolShortcut) {
|
||||
v, err = evalOrWithShortcut(ctx, self)
|
||||
} else {
|
||||
v, err = evalOrWithoutShortcut(ctx, self)
|
||||
|
||||
Reference in New Issue
Block a user