From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Tiny error in GNAT: wrong message about unknown discrimant
Date: Wed, 25 May 2011 19:08:29 +0200
Date: 2011-05-25T19:08:29+02:00 [thread overview]
Message-ID: <op.vv1q8fbmule2fv@douda-yannick> (raw)
Hello,
Create a type with an unknown discriminant in the public part of a package
(and optionally a concrete discriminant in the full definition). Declare
an instance of that type in a procedure outside of that package, and do so
without any initialization, and instead, erroneously add a discriminant.
GNAT will complain “invalid constraint: type has no discriminant”. This is
inconsistent, as the type has a discriminated view; it should instead say
“invalid constraint: type discriminant is unknown”.
Not sure it is worth a bug report, but at least, this is probably
confusing enough for beginners.
--
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour
les chiens.
“ c++; /* this makes c bigger but returns the old value */ ” [Anonymous]
next reply other threads:[~2011-05-25 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 17:08 Yannick Duchêne (Hibou57) [this message]
2011-05-27 8:45 ` Tiny error in GNAT: wrong message about unknown discrimant Georg Bauhaus
2011-05-27 14:14 ` Yannick Duchêne (Hibou57)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox