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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,be6cbf679aee02c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 26 Oct 2005 21:46:47 -0500 From: "Steve" Newsgroups: comp.lang.ada References: <%DV7f.13378$rE2.2085@fe10.lga> Subject: Re: Why was it done this way ? Date: Wed, 26 Oct 2005 19:46:54 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 24.20.111.245 X-Trace: sv3-SChEFALTAQTOFMiWg8J+otjTDguFVG4UtXZTNnRRFW7rYGTnGVEpjtnGVt+GOQUDvodXEfWSb9B98tr!EuThxzP2o6kJltMYnmkOocLity+LwcDovNcJRG048zDyEFEZcTKk6kZ5pxENjZdZN4xypwTge08L X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5978 Date: 2005-10-26T19:46:54-07:00 List-Id: "Heimlich Manure" wrote in message news:%DV7f.13378$rE2.2085@fe10.lga... > Hello respectable group, > > This may be a silly question but I'm sure there was reasoning behind > allowing such : > > with Ada.Text_IO; > use Ada.Text_IO; > > procedure My_Example is > task type T1; > task type T2; > > task body T1 is > begin > Put_Line("Instantiating T2 from T1"); > declare > T_2_2 : T2; > begin > null; > end; > end T1; > > task body T2 is > begin > Put_Line("Instantiating T1 from T2"); > declare > T_1_1 : T1; > begin > null; > end; > end T2; > > T_1 : T2; > begin > null; > end My_Example; > > Question is, why is this legit ? > Why would it not be legit? It looks kind of like infinite recursion involving tasks to me. Probably not something you would want to do, but expecting a lot for the compiler to detect the condition. If the compiler did detect the condition, the most I would hope for is a warning... after all it may have been the intent. Steve (The Duck)