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: a07f3367d7,556e5b18154df788 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.172.200 with SMTP id m8mr2284022qaz.0.1364569014686; Fri, 29 Mar 2013 07:56:54 -0700 (PDT) X-Received: by 10.50.160.132 with SMTP id xk4mr228462igb.7.1364569014647; Fri, 29 Mar 2013 07:56:54 -0700 (PDT) Path: v17ni9qad.0!nntp.google.com!ca1no16280821qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 29 Mar 2013 07:56:54 -0700 (PDT) In-Reply-To: <61ece03f-9528-4371-b209-6046f975dc3b@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.20.190.126 References: <61ece03f-9528-4371-b209-6046f975dc3b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Interresting, possibly buggy behavior in GNAT generics w/ expression function. From: Shark8 Injection-Date: Fri, 29 Mar 2013 14:56:54 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-03-29T07:56:54-07:00 List-Id: On Friday, March 29, 2013 8:47:23 AM UTC-6, Shark8 wrote: > On Friday, March 29, 2013 1:45:04 AM UTC-6, Simon Wright wrote: > > > In Generic_Attribute_Set, you have two Image functions: > > > > function Image(Value : Attribute_Values) return String > > > > (Attribute_Values is a generic formal scalar) and > > > > function Image(Value : Positive) return String > > > > and you instantiate the package with Attribute_Values => Integer. > > > > > > What happens when you change the second Image's parameter to Integer is > > that GNAT chooses the wrong Image to call! But, what's odd is that the parameter works on one when "positive" and fails when "natural" -- that is, I think, the far more puzzling behavior.