From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: compiler confusion, overloading and "subtype mark required in this context" Date: Wed, 10 Feb 2021 21:03:51 -0600 Organization: JSA Research & Innovation Message-ID: References: <2241c895-8d4d-40fc-bf42-aa1c3daa0167n@googlegroups.com> <4360fbab-d22f-4a21-bc9b-aebe6b3c1faan@googlegroups.com> Injection-Date: Thu, 11 Feb 2021 03:03:52 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="18366"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:61342 List-Id: "Mehdi Saada" <00120260a@gmail.com> wrote in message news:4360fbab-d22f-4a21-bc9b-aebe6b3c1faan@googlegroups.com... >> If I count corretctly, looks like a closing ) is missing at the end. Thus >> in the else part, you have >> Rational*Integer. > Ahhhh... I'm not used to these kinds of error messages ! I kinda > understand what happened later in functions then... just kind :-) > Experiences makes good eyes... well I see myself getting better at it too. >> Here you have Positive as a type name and as an enumeration literal. > I saw, but it seemed to me the context was clear enough, I'm surprised > gnat doesn't agree with me. Type names don't allow overloading. So if you have both an enumeration literal and a type name, you can only get one or the other (or neither in some cases). If you're using both, something has to be illegal. Only subprograms can be overloaded (enumeration literals are technically functions). Randy.