DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B3012: Initializes does not match what elaboration assigns

Catalog status: active. Default severity: error. Stable name: initializes-mismatch. Family: Flow and effects.

A package's Initializes aspect must list exactly the package variables that its elaboration gives a value, ghost ones included.

Example (Vada)

   package State with Initializes => (Count, Limit) is
      Count : Natural;          --  listed, but not initialised
      Total : Natural := 0;     --  initialised, but not listed

Example (Varc)

package State @Initializes(count, limit) {
    pub var count: Natural;          // listed, but not initialised
    pub var total: Natural = 0;      // initialised, but not listed

What to do

Make the list and the declarations agree, or remove Initializes 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.