comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Using a generic instance to implement a public subprogram?
Date: Mon, 4 Feb 2008 19:58:52 -0600
Date: 2008-02-04T19:58:52-06:00	[thread overview]
Message-ID: <fo8ftf$han$1@jacob-sparre.dk> (raw)
In-Reply-To: 47a609b8$0$23664$4d3efbfe@news.sover.net

"Peter C. Chapin" <pchapin@sover.net> wrote in message
news:47a609b8$0$23664$4d3efbfe@news.sover.net...
...
> GNAT says this:
>
> check.adb:3:14: missing body for "Sqrt" declared at check.ads:5
> check.adb:21:13: "Sqrt" conflicts with declaration at check.ads:5
> check.adb:21:13: instantiation cannot provide body for it
>
> The first message I understand. The last two I'm not clear about. Is
> GNAT telling me that my declarations conflict in some way and because of
> that it can't do the instantiation, or is the instantiation the *cause*
> of the conflict? Is it possible to do what I'm trying to do here?

An instantiation cannot complete another declaration. You have to use a body
renaming for that, as someone else suggested.

Formally, an instantiation cannot be a completion. (See 3.11.1 for a
definition of completion.)

                    Randy.





      parent reply	other threads:[~2008-02-05  1:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03 18:35 Using a generic instance to implement a public subprogram? Peter C. Chapin
2008-02-03 19:27 ` Gautier
2008-02-03 19:46   ` Peter C. Chapin
2008-02-03 20:37     ` Dmitry A. Kazakov
2008-02-05  1:58 ` Randy Brukardt [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox