From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cd9f035c69cea274,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!xlned.com!feeder3.xlned.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Tiny error in GNAT: wrong message about unknown discrimant Date: Wed, 25 May 2011 19:08:29 +0200 Organization: Ada @ Home Message-ID: NNTP-Posting-Host: cXtVrQm6taKrmeBNtKLq9A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.01 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19476 Date: 2011-05-25T19:08:29+02:00 List-Id: Hello, Create a type with an unknown discriminant in the public part of a packa= ge = (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 =E2=80=9Cinvalid constraint: type has no discriminant= =E2=80=9D. This is = inconsistent, as the type has a discriminated view; it should instead sa= y = =E2=80=9Cinvalid constraint: type discriminant is unknown=E2=80=9D. 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=E2=80=99es= t pas pour = les chiens. =E2=80=9C c++; /* this makes c bigger but returns the old value */ =E2=80= =9D [Anonymous]