From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Markus_Sch=c3=b6pflin?= Newsgroups: comp.lang.ada Subject: ASIS exception with AdaCtl v1.19r10 Date: Fri, 12 Oct 2018 10:23:24 +0200 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: MdpKeRr+sx3LK7JQiK5aNw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 X-Notice: Filtered by postfilter v. 0.8.3 X-Mozilla-News-Host: news://nntp.aioe.org:119 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:54548 Date: 2018-10-12T10:23:24+02:00 List-Id: 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