DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B2004: name cannot be called, indexed or converted

Catalog status: active. Default severity: error. Stable name: not-callable. Family: Types and constraints.

X (...) is a function call, an array element, or a type conversion. Here X is none of these: for example a scalar variable.

Example (Vada)

   X : Integer := 3;
   ...
   X := X (1);

Example (Varc)

    var x: Integer = 3;
    ...
    x = x[1];

What to do

Check the name: perhaps an array or function with a similar name was meant.

Regression source and further reading

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

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