# LDC-E2120 โ€” An aggregate argument the shape does not allow ## What it means Aggregate calls take a fixed set of arguments: the collection, an emptiness policy on some of them, and rounding controls on one of them. Each of these has its own place โ€” a positional triple means rounding and belongs to averaging alone, an emptiness policy never applies to counting, and unknown names fit nowhere. When an argument lands where the shape has no slot for it, the compiler refuses the call at the call site. The rule behind every refusal is the same: an option the evaluator would silently ignore must not be writable. Dropping the misplaced argument, or moving the policy to the argument the shape provides for it, clears the refusal. ## Example ```law language "law.core" version "0.2"; package demo.diagnostics version "0.1.0"; namespace "urn:law:demo:diagnostics"; entity Order; relation amount(x: Order, a: Integer) kind empirical; relation big(x: Order) kind institutional; rule T strict { for x: Order; when amount(x, 1) and (count(collect y: Order where amount(y, 1), empty: 0) > 0); then big(x); } ``` ## Fix ```law language "law.core" version "0.2"; package demo.diagnostics version "0.1.0"; namespace "urn:law:demo:diagnostics"; entity Order; relation amount(x: Order, a: Integer) kind empirical; relation big(x: Order) kind institutional; rule T strict { for x: Order; when amount(x, 1) and (count(collect y: Order where amount(y, 1)) > 0); then big(x); } ``` ## Engine message The engine reports this in its own wording: ```text example.law:8:97: error LDC-E2120: count: `empty` does not apply (ยง59): an empty count always yields 0, and the emptiness policy has nothing to apply to. Before errata E-0195 it was accepted and SILENTLY not applied ``` ## Related - [Expressions and quantities](/constructs/expressions-quantities/) โ€” how aggregate calls are written.