DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B1020: APL Workbench analysis beyond its generic-instantiation budget

Catalog status: active. Default severity: error. Stable name: workbench-instance-budget. Family: Names and declarations.

To show the names visible at an APL expression, the APL Workbench checks the surrounding source in a bounded analysis. That analysis makes at most 128 generic instances, nested at most 32 deep; a source that needs more is refused by the workbench. Ordinary checking, proof and compilation have no such budget and are unaffected.

Example (Vada)

pragma Extensions_Allowed (On);
procedure Main is
   generic type Item is private; function Same (X : Item) return Item;
   function Same (X : Item) return Item is (X);
   function Same_1 is new Same (Integer);
   --  ... and so on, to Same_140
   R : Integer := APL ("1");
begin
   null;
end Main;

Opening the workbench on APL ("1") reports B1020 at the instantiation past the budget.

What to do

Edit the expression as text in the source editor, or use the workbench on an expression in a unit with fewer instances. The program itself checks, proves and compiles as written.

Regression source and further reading

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