(ctx *OptimizerContext, a *ast.AST)
| 1380 | type testVariadicLogicOptimizer struct{} |
| 1381 | |
| 1382 | func (t *testVariadicLogicOptimizer) Optimize(ctx *OptimizerContext, a *ast.AST) *ast.AST { |
| 1383 | call := ctx.NewCall(operators.LogicalAnd, ctx.NewIdent("x"), ctx.NewLiteral(types.True), ctx.NewIdent("y")) |
| 1384 | return ctx.NewAST(call) |
| 1385 | } |
| 1386 | |
| 1387 | func TestConstantFoldingOptimizer_VariadicShortcircuitLogic(t *testing.T) { |
| 1388 | env, err := NewEnv(Variable("x", BoolType), Variable("y", BoolType)) |
nothing calls this directly
no test coverage detected