DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B1005: declaration without its completion

Catalog status: active. Default severity: error. Stable name: missing-completion. Family: Names and declarations.

Some declarations promise a later completion: a subprogram declared in a package needs a body in the package body; a private type needs its full declaration in the private part; a constant needs a value. Verada reports the declaration whose completion is missing. It checks the whole program, so a missing body (a generic subprogram's, say) is an error when the program is checked, where Ada leaves it to the link. Before its completion a private type is not yet complete, so an object of it, or of a type with a part of one, cannot be renamed until after its full declaration (X : T renames Get.all; in the visible part is reported too).

Example (Vada)

package Stacks is
   procedure Pop (S : in out Stack; X : out Integer);   --  no body in `package body Stacks`
end Stacks;

Example (Varc)

package Stacks {
    pub let capacity: Natural;   // no value
}

What to do

Add the completion (the body, the full type declaration or the value), or remove the declaration.

Regression source and further reading

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

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