comp.lang.ada
 help / color / mirror / Atom feed
* Tiny error in GNAT: wrong message about unknown discrimant
@ 2011-05-25 17:08 Yannick Duchêne (Hibou57)
  2011-05-27  8:45 ` Georg Bauhaus
  0 siblings, 1 reply; 3+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-25 17:08 UTC (permalink / 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]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-27 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 17:08 Tiny error in GNAT: wrong message about unknown discrimant Yannick Duchêne (Hibou57)
2011-05-27  8:45 ` Georg Bauhaus
2011-05-27 14:14   ` Yannick Duchêne (Hibou57)

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