(ctx *OptimizerContext, a *ast.AST)
| 1917 | type testVariadicLogicOptimizer struct{} |
| 1918 | |
| 1919 | func (t *testVariadicLogicOptimizer) Optimize(ctx *OptimizerContext, a *ast.AST) *ast.AST { |
| 1920 | call := ctx.NewCall(operators.LogicalAnd, ctx.NewIdent("x"), ctx.NewLiteral(types.True), ctx.NewIdent("y")) |
| 1921 | return ctx.NewAST(call) |
| 1922 | } |
| 1923 | |
| 1924 | func TestConstantFoldingOptimizer_VariadicShortcircuitLogic(t *testing.T) { |
| 1925 | env, err := NewEnv(Variable("x", BoolType), Variable("y", BoolType)) |
nothing calls this directly
no test coverage detected