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=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.66.233.130 with SMTP id tw2mr3031573pac.21.1364939064502; Tue, 02 Apr 2013 14:44:24 -0700 (PDT) Path: jv11ni490pbb.0!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Interresting, possibly buggy behavior in GNAT generics w/ expression function. Date: Fri, 29 Mar 2013 07:45:04 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Info: mx05.eternal-september.org; posting-host="72a7bb6120f61bc7749e29c9c2e535af"; logging-data="1627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+M9zfJy0wtJCO/PsktE5WA3l8BcU9GtDY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:pmCTdyVoD5W/JBUYYdJJc507n84= sha1:vDloucyJvL773ye6ZjWlspG6Tfk= X-Received-Bytes: 1746 Content-Type: text/plain Date: 2013-03-29T07:45:04+00:00 List-Id: 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! I don't know whether this is a language problem or a GNAT problem. Or, of course, a user problem! (It's not a problem with statement functions; the same happens if the function implementations are moved to the body).