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=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:b2c6:: with SMTP id b189mr12224137qkf.363.1612695587316; Sun, 07 Feb 2021 02:59:47 -0800 (PST) X-Received: by 2002:a25:4d08:: with SMTP id a8mr18041735ybb.465.1612695587137; Sun, 07 Feb 2021 02:59:47 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 7 Feb 2021 02:59:46 -0800 (PST) In-Reply-To: <2241c895-8d4d-40fc-bf42-aa1c3daa0167n@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=94.31.100.133; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 94.31.100.133 References: <2241c895-8d4d-40fc-bf42-aa1c3daa0167n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: compiler confusion, overloading and "subtype mark required in this context" From: AdaMagica Injection-Date: Sun, 07 Feb 2021 10:59:47 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61308 List-Id: Without the full code, it's difficult to answer. function "+" (R1: T_rational; R2: T_rational) return T_rational is (if (denom(R1) = denom(R2)) then (ENUM(R1) + ENUM(r2))/ denom(R1) else (DENOM(R2)*ENUM(R1) + denom(r1)*ENUM(r2))/DENOM(R1)*denom(R2)); If I count corretctly, looks like a closing ) is missing at the end. Thus in the else part, you have Rational*Integer. sign : T_SIGN := Positive; Last: Positive; Here you have Positive as a type name and as an enumeration literal.