DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B1017: overriding indicator does not match

Catalog status: active. Default severity: error. Stable name: overriding-mismatch. Family: Names and declarations.

overriding says that a subprogram overrides a primitive its type inherited, and not overriding says that it does not (RM 8.3.1). The indicator is wrong: a misspelt name or a changed profile turns an intended overriding into a new subprogram, and the indicator is how the mistake is caught.

Example (Vada)

   type Square is new Shape with null record;
   overriding procedure Shrink (S : in out Square);   --  Shape has no Shrink

Example (Varc)

    pub type Square = new Shape with struct {}
    pub override fn Shrink(S: inout Square);   // Shape has no Shrink

What to do

Check the name and the parameter and result types against the parent's primitive, or drop the indicator (or change it) if the subprogram is meant to be new.

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.