comp.lang.ada
 help / color / mirror / Atom feed
* ASIS exception with AdaCtl v1.19r10
@ 2018-10-12  8:23 Markus Schöpflin
  2018-10-12 12:25 ` J-P. Rosen
  2018-10-12 12:50 ` J-P. Rosen
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Schöpflin @ 2018-10-12  8:23 UTC (permalink / raw)


Given the following simple test program:

---%<---
procedure TEST
is
    package A is
       type T is new FLOAT;
    end A;

    function F return A.T'BASE
    is
    begin
       return 0.0;
    end F;

begin
    null;
end TEST;
-->%---

Checking this program with AdaCtl gives the following exception:

---%<---
 > adactl -l "check style(no_closing_name)" test
============= Phase: Processing =============
AdaCtl version: 1.19r10 with ASIS 2.0.R for GNAT Pro 7.4.2 (20160527)
ASIS error: ASIS.EXCEPTIONS.ASIS_INAPPROPRIATE_ELEMENT
    In rule: STYLE
   For unit: TEST
Status   : VALUE_ERROR
Diagnosis: Inappropriate Element Kind in 
Asis.Expressions.Corresponding_Name_Declaration (A_SELECTED_COMPONENT)
called in Actual procedure for Pre_Operation
with the argument : A_FUNCTION_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:7:4
    Nodes:
       Node            : 2315 - N_SUBPROGRAM_BODY
       R_Node          : 2315 - N_SUBPROGRAM_BODY
       Node_Field_1    : 0 - N_EMPTY
       Node_Field_2    : 0 - N_EMPTY
    Rel_Sloc           : 65
    obtained from the tree test.adt (Tree_Id = 1)
called in Asis.Iterator.Traverse_Element
with the argument : A_FUNCTION_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:7:4
    Nodes:
       Node            : 2315 - N_SUBPROGRAM_BODY
       R_Node          : 2315 - N_SUBPROGRAM_BODY
       Node_Field_1    : 0 - N_EMPTY
       Node_Field_2    : 0 - N_EMPTY
    Rel_Sloc           : 65
    obtained from the tree test.adt (Tree_Id = 1)
called in Actual procedure for Pre_Operation
with the argument : A_PROCEDURE_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:1:1
    Nodes:
       Node            : 2279 - N_SUBPROGRAM_BODY
       R_Node          : 2279 - N_SUBPROGRAM_BODY
       Node_Field_1    : 0 - N_EMPTY
       Node_Field_2    : 0 - N_EMPTY
    Rel_Sloc           :-10
    obtained from the tree test.adt (Tree_Id = 1)
called in Asis.Iterator.Traverse_Element
with the argument : A_PROCEDURE_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:1:1
    Nodes:
       Node            : 2279 - N_SUBPROGRAM_BODY
       R_Node          : 2279 - N_SUBPROGRAM_BODY
       Node_Field_1    : 0 - N_EMPTY
       Node_Field_2    : 0 - N_EMPTY
    Rel_Sloc           :-10
    obtained from the tree test.adt (Tree_Id = 1)
-->%---

Is there anything wrong with my test, or am I facing an error in either the 
ASIS implementation or AdaCtl here?

-- 
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-12 13:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12  8:23 ASIS exception with AdaCtl v1.19r10 Markus Schöpflin
2018-10-12 12:25 ` J-P. Rosen
2018-10-12 12:37   ` Markus Schöpflin
2018-10-12 12:50 ` J-P. Rosen
2018-10-12 13:25   ` Markus Schöpflin
2018-10-12 13:35     ` J-P. Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox