B6006: invalid Finalizable aspect
Catalog status: active. Default severity: error. Stable name: invalid-finalizable. Family: Ownership and finalization.
The type's finalization declaration or cleanup profile does not satisfy Verada's resource rules. Read the diagnostic's note to identify the rejected component. Finalization supports both limited reclaimed types and copyable reclaimed types; it is not restricted to the older limited-only subset.
A reclaimed type requires Finalize and Relaxed_Finalization => True. The finalizer is a procedure with one in out parameter of the type, declared in the appropriate package specification, without a precondition. Its implicit calls must terminate. An Initialize component is not supplied by this mechanism: ordinary initialization establishes the value.
A nonlimited reclaimed type also requires a valid Adjust procedure. The adjuster has one in out parameter, no precondition, must terminate and requires Global => null. Ordinary owned access components cannot be copied this way. A limited reclaimed type cannot supply an adjuster because its objects are not freely copied.
Example (Vada)
type Text is private
with Finalizable => (Finalize => Free_Text, Relaxed_Finalization => True);
-- A nonlimited reclaimed type also needs its supported Adjust component.Example (Varc)
pub type Text = private
@Finalizable(Finalize => free_text, Relaxed_Finalization => True);
// Supply Adjust for a copyable reclaimed type, or make the resource limited.
What to do
Choose a limited owner if the resource has one owner and cannot support logical copying. For a copyable immutable or reference-counted abstraction, provide the required adjuster and finalizer profiles and prove their resource behavior. Match the full type and public view; do not fix the aspect while leaving the implementation copy semantics inconsistent.
The ownership reference defines scope cleanup, moved parts, copyable reclamation and the absence of a program-termination finalization guarantee.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See ownership and finalization, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.