comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Tardieu <sam@rfc1149.net>
Subject: Re: Generic body
Date: Wed, 14 May 2008 23:51:26 +0200
Date: 2008-05-14T23:55:01+02:00	[thread overview]
Message-ID: <873aok1rmp.fsf@willow.rfc1149.net> (raw)
In-Reply-To: g0fash$73v$1@registered.motzarella.org

>>>>> "S�bastien" == S�bastien  <seb.morand@gmail.com> writes:

S�bastien> I don't how to do this because: 1) The compiler refuse the
S�bastien> instance of MyProc because it doesn't have the MyProc body
S�bastien> 2) If I put the body of MyProc in the package spec, the
S�bastien> compiler refuses it because it's not the right place.

What compiler are you using? (name and version)

With a recent GNAT, I get:

     7.   procedure MyProcInt is new MyProc(Toto => Integer);
          |
        >>> warning: cannot instantiate "MyProc" before body seen
        >>> warning: Program_Error will be raised at run time

     8.   procedure MyProcStr is new MyProc(Toto => String);
                                                    |
        >>> actual for "Toto" must be a definite subtype

which I think explains things well.

  Sam
--
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/



  parent reply	other threads:[~2008-05-14 21:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14 18:26 Generic body Sébastien
2008-05-14 21:49 ` Randy Brukardt
2008-05-14 21:51 ` Samuel Tardieu [this message]
2008-05-14 22:03 ` Adam Beneschan
2008-05-15  9:25   ` Sébastien
2008-05-15 14:59     ` Adam Beneschan
2008-05-15 15:40       ` Sébastien
2008-05-15  8:43 ` gautier_niouzes
2008-05-15 13:11   ` Sébastien
replies disabled

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