From: "Markus Schöpflin" <no.spam@spam.spam>
Subject: ASIS exception with AdaCtl v1.19r10
Date: Fri, 12 Oct 2018 10:23:24 +0200
Date: 2018-10-12T10:23:24+02:00 [thread overview]
Message-ID: <ppplls$s2b$1@gioia.aioe.org> (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
next reply other threads:[~2018-10-12 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 8:23 Markus Schöpflin [this message]
2018-10-12 12:25 ` ASIS exception with AdaCtl v1.19r10 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox