DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B3008: dependency not stated in Depends

Catalog status: active. Default severity: error. Stable name: dependency-missing. Family: Flow and effects.

Information flows from an input to an output that the Depends contract does not mention, either through an assignment or through a condition that decides what is assigned. The label shows where the flow happens.

Example (Vada)

   procedure Choose (Flag : Boolean; A, B : Integer; Result : out Integer)
     with Depends => (Result => (A, B));   --  Result also depends on Flag

Example (Varc)

    pub fn choose(flag: Boolean, a, b: Integer, result: out Integer)
        @Depends(result => (a, b))   // result also depends on flag

What to do (Vada)

Add the input to the output's clause (here Result => (Flag, A, B)), or remove the Depends contract and let Verada infer it.

What to do (Varc)

Add the input to the output's clause (here @Depends(result => (flag, a, b))), or remove the @Depends contract and let Verada infer it.

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See flow and effects, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.