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,9c9db81a63ddf1fe X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z31g2000vbs.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: extended membership tests Date: Thu, 31 Mar 2011 02:28:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: <126e9817-7263-450c-8637-6add40095bec@z31g2000vbs.googlegroups.com> References: <7dc23d58-4a48-4444-90cd-7f9786b19aad@i14g2000yqe.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301563720 15781 127.0.0.1 (31 Mar 2011 09:28:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 31 Mar 2011 09:28:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z31g2000vbs.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19594 Date: 2011-03-31T02:28:40-07:00 List-Id: > =A0 =A0 package int_sets is new ada.containers.ordered_sets(integer); > =A0 =A0 x: integer :=3D 6; > =A0 =A0 b2: boolean :=3D x in int_sets.to_set(new_item =3D> y); Ah, my previous statement was not quite correct. I didn't check, but I guess, sets are tagged, so the tested type is tagged. Therefore the simple expression (x) must be convertible to the tested type, which it isn't. So the statement is illegal (as before, but for a different reason).