# Tests that a large `if` guard on an incomplete bool does not trigger
# O(n) work per field inside the conditional block. Each field in the
# guarded struct should not independently re-evaluate the condition.
# https://cuelang.org/issue/3307
-- in.cue --
@test(err, code=incomplete, contains="incomplete bool")
if _request.enabled {
    r1: {
        k1: 0
        k2: 0
        k3: 0
        k4: 0
        k5: 0
        k6: 0
        k7: 0
        k8: 0
        k9: 0
        k10: 0
        k11: 0
        k12: 0
        k13: 0
        k14: 0
        k15: 0
        k16: 0
        k17: 0
    }
}

_request: enabled: _
-- out/errors.txt --
[incomplete] incomplete bool: _
-- out/eval/stats --
Leaks:  18
Freed:  3
Reused: 0
Allocs: 21
Retain: 0

Unifications: 21
Conjuncts:    3
Disjuncts:    0

NumCloseIDs: 1
