comp.lang.ada
 help / color / mirror / Atom feed
From: Martin <martin.dowie@btopenworld.com>
Subject: Re: Ada2012 Invariants and obaque types
Date: Wed, 22 Jun 2011 06:57:19 -0700 (PDT)
Date: 2011-06-22T06:57:19-07:00	[thread overview]
Message-ID: <56d9237f-5d58-42e7-af7a-9d24a1bc3d37@r21g2000pri.googlegroups.com> (raw)
In-Reply-To: 77766f76-d984-4173-bc7e-defe2b99a262@glegroupsg2000goo.googlegroups.com

On Jun 22, 11:39 am, Egil Høvik <egilho...@hotmail.com> wrote:
> > Example:
> > package P1 is
> >    type T1 is tagged private
> >       with Invariant => Is_Valid (T1);
>
> I believe it's called Type_Invariant, not just Invariant.
>
>  http://www.ada-auth.org/standards/12rm/html/RM-7-3-2.html#I3544

Sadly, that still didn't help:

package P1 is
   type T1 is tagged private
     with Type_Invariant => True;
private
   type Imp;
   type Imp_Ref is not null access Imp;
   type T1 is tagged
      record
         I : Imp_Ref;
      end record;
end P1;

Results in:
gnatmake -d -PH:\Ada\test_invarients\test_invarients.gpr p1.ads
gcc -c -g -g -gnatE -fstack-check -gnato -gnatf -fcallgraph-info=su,da
-gnat12 -I- -gnatA H:\Ada\test_invarients\src\p1.ads
p1.ads:5:04: type "Imp" is frozen at line 2 before its full
declaration
gnatmake: "H:\Ada\test_invarients\src\p1.ads" compilation error

[2011-06-22 14:53:53] process exited with status 4 (elapsed time:
16.29s)

Thanks anyway.

-- Martin
p.s. I got 'Invariant' from the AI...must now remember that AI's are
not always the 'latest-and-greatest'!



  reply	other threads:[~2011-06-22 13:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21  8:53 Ada2012 Invariants and obaque types Martin
2011-06-21 10:27 ` Yannick Duchêne (Hibou57)
2011-06-21 10:36   ` Martin
2011-06-21 10:46   ` Martin
2011-06-21 18:42     ` Yannick Duchêne (Hibou57)
2011-06-21 10:43 ` Ludovic Brenta
2011-06-21 10:53   ` Martin
2011-06-21 11:14 ` Martin
2011-06-21 11:31 ` Robert A Duff
2011-06-21 11:48   ` Martin
2011-06-21 12:01   ` Martin
2011-06-21 12:13     ` Robert A Duff
2011-06-21 12:22       ` Martin
2011-06-21 12:54         ` Robert A Duff
2011-06-21 13:00           ` Martin
2011-06-21 12:08 ` Dmitry A. Kazakov
2011-06-21 12:17   ` Georg Bauhaus
2011-06-21 12:31     ` Dmitry A. Kazakov
2011-06-21 13:29       ` Georg Bauhaus
2011-06-21 14:42         ` Dmitry A. Kazakov
2011-06-21 18:37   ` Yannick Duchêne (Hibou57)
2011-06-21 18:53     ` Dmitry A. Kazakov
2011-06-21 19:34       ` Vinzent Hoefler
2011-06-21 20:52         ` Dmitry A. Kazakov
2011-06-21 21:50           ` Vinzent Hoefler
2011-06-22  7:55             ` Dmitry A. Kazakov
2011-06-21 21:18       ` Manuel Collado
2011-06-22  8:00         ` Dmitry A. Kazakov
2011-06-22 10:39 ` Egil Høvik
2011-06-22 13:57   ` Martin [this message]
2011-06-23 16:21 ` anon
replies disabled

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