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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a05:620a:7ca:: with SMTP id 10mr25431393qkb.410.1570474901003; Mon, 07 Oct 2019 12:01:41 -0700 (PDT) X-Received: by 2002:a9d:3b26:: with SMTP id z35mr21597849otb.182.1570474900599; Mon, 07 Oct 2019 12:01:40 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no6014406qtl.0!news-out.google.com!q23ni288qtl.1!nntp.google.com!o24no6014403qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 7 Oct 2019 12:01:40 -0700 (PDT) In-Reply-To: <50fceebb-c48e-4b38-b0f5-2318672a70c1@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.169.209.222; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 91.169.209.222 References: <1c12f540-00b8-4be8-bfc6-13ad31d9916c@googlegroups.com> <96d5218a-2714-40dd-988d-10c7d27a96a2@googlegroups.com> <665a8b5e-533e-4df6-a1c1-7a4c257ea277@googlegroups.com> <50fceebb-c48e-4b38-b0f5-2318672a70c1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <58103920-4692-46b8-9426-e5a85fa04e77@googlegroups.com> Subject: Re: GNAT: no visible subprogram matches the specification for "Put" From: briot.emmanuel@gmail.com Injection-Date: Mon, 07 Oct 2019 19:01:40 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57257 Date: 2019-10-07T12:01:40-07:00 List-Id: > The visibility of generic formal parameters outside the generic body is p= roblematic in GNAT. LRM 8.2 (8) says: I have had this problem forever too, but I was told by the GNAT and Ada experts that this was actually expected behavior, though I can never rememb= er the corresponding parts of the LRM. I think it has to do with whether the u= ser of the generic instance can see what the actual parameters were. So if = you pass the signature package as a parameter in the instantiation of anoth= er generic, then you can reference the formal parameters, but if the compil= er see statically what the actual parameters are, you cannot. This is a pain point when using generics. It would be nice if someone (Randy, Bob ?) could confirm one way or the oth= er. > One workaround is to put a rename declaration in the generic package: This is indeed the proper workaround, but this is a pain because we have to= invent a second name to designated the same thing.