Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Using Enumerated Types as Array Indexes References: <4e4b0d81$0$314$14726298@news.sunsite.dk> <4e4b1fe4$0$314$14726298@news.sunsite.dk> <6d418cda-dab3-43df-a9ec-293b43f2bbd8@glegroupsg2000goo.googlegroups.com> <4e4cdfab$0$2524$da0feed9@news.zen.co.uk> <9b74tiFf06U1@mid.individual.net> <9b8687Fa7tU1@mid.individual.net> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 19 Aug 2011 22:59:32 GMT Lines: 17 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1313794772 tunews.univie.ac.at 71616 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7258 Robert Klemme wrote: > On 20.08.2011 00:12, Arved Sandstrom wrote: >> On 11-08-19 05:10 PM, Andreas Leitgeb wrote: >>> Robert Klemme wrote: >>>> byte b = 0xA0; // won't compile >>> Actually, it *does* compile due to some special rule in >>> the JLS w.r.t initializers. > Andreas, which rule and which compiler? The four letter rule "oups", as it seems. The rule itself was, that you can assign an in-range literal (e.g. 42) to a byte variable, although you cannot feed it to a method that takes bytes. But I got both the rule and the context wrong in my head, so ... Duh, me! And now let's forget this subthread, will we? ;)