This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: Patch: error->warning when assigning to final field
Hi,
On Sun, Jan 14, 2001 at 01:46:01PM -0800, Per Bothner wrote:
> Mark Wielaard <mark@klomp.org> writes:
>
> > It does violate JLS 4.5.4, 8.3.1.2, 15.14.1/2, 15.15.1/2, 15.26 and
> > chapter 16 (see also the example in 6.5.6).
>
> I'm sorry if my message was misleading. Of course the compiler should
> complain when compiling a .java source file to either native or .class.
> (Javac does complain about this - at least I assume it does.)
>
> However, this patch is for compiling .class files to source files.
> [...]
> So quoting from the JLS is irrelevant.
Ah, I see. Sorry about my confusion. You are right when talking about
compiling from bytecode. Although I think it is strange that the JLS
explicitly forbits it but the JVM allows it. Do you know why the JVM
allows for this non-intuitive behaviour?
Cheers,
Mark