Opened 5 years ago

Closed 5 years ago

Last modified 21 months ago

#432 closed defect (fixed)

empty arrays

Reported by: vadim.godunko Owned by: Maxim Reznik
Priority: major Milestone: 18.0
Component: Matreshka - Web Services Version:
Keywords: Cc:

Description

A2JS is unable to compile:

   type Device_Information is record
      null;
   end record;

   type Device_Array is array (Positive range <>) of Device_Information;

   type Device_Array_Access is access all Device_Array;

   Devices : Device_Array_Access := new Device_Array (1 .. 0);
AN_INDEX_CONSTRAINT CODE

Element Debug_Image:
AN_INDEX_CONSTRAINT
located in Water_Consumption_Forms (spec, Unit_Id = 3, Context_Id = 1)
text position : water_consumption_forms.ads:49:54
   Nodes:
      Node            : 2938 - N_INDEX_OR_DISCRIMINANT_CONSTRAINT
      R_Node          : 2938 - N_INDEX_OR_DISCRIMINANT_CONSTRAINT
      Node_Field_1    : 0 - N_EMPTY
      Node_Field_2    : 0 - N_EMPTY
   Rel_Sloc           : 906
   obtained from the tree /home/godunko/Matreshka/frame/frame/design/water/.objs/water_consumption_forms.adt (Tree_Id = 1)

raised CONSTRAINT_ERROR : Engines.Contexts.Text_Engines.Action_Maps.Element: no element available because key not in map

Change History (2)

comment:1 by Maxim Reznik, 5 years ago

Owner: set to Maxim Reznik
Resolution: fixed
Status: newclosed

In 5471:

Add constructor for unconstrained_array types.

fixed #432

comment:2 by vadim.godunko, 21 months ago

Milestone: 0.8.018.0

Milestone renamed

Note: See TracTickets for help on using tickets.