On 3 Aug 2000, Juergen Kreileder wrote:

> >>>>> "Dimitris" == Dimitris Vyzovitis <[EMAIL PROTECTED]> writes:
> 
>     Dimitris> If you try to compile those files with jikes or ibm's
>     Dimitris> javac,
> 
> "IBM's javac" is somewhat misleading, javac is written in Java and most
> implementations based on Sun's code use it without modifications.  So
> the differences between Sun's/Blackdown's/IBM's javac should be very
> small to non-existent (when using the same Java2 SDK version).
> 
>     Dimitris> everything works smoothly.  However, if your do
>     Dimitris> so with blackdown's 1.2.2RC4, the following error
>     Dimitris> occurs: [dimitris@gauss bugs]$ javac a.java c.java
>     Dimitris> c.java:4: Undefined variable or class name: b
>     Dimitris>         System.out.println( b.test );
>     Dimitris>                             ^
>     Dimitris> 1 error
> 
> javac from 1.1/1.2 has many problems with nested classes/interfaces.
> The new javac from 1.3 fixes most of them.
> 
> 
> BTW, jikes has some problems with this stuff too:
> 
> interface I
> {
>     abstract class C
>     {
>         static C c = new C() {
>             interface InnerI {}
>         };
>     }
> }
> 
> According to the JLS2Draft this code is illegal, interfaces are not
> allowed in inner classes:
> It looks like the 'static' confuses jikes and it thinks 'static C c =
> new C() {..}' defines a new top-level class (or according to the new
> terminology: a static member class) but it actually defines an
> anonymous class inside a static context (JLS2 8.1.2).  Also JLS 15.9.5
> says: "An anonymous class is always an inner class; it is never static
> (§8.5.2)."
> So "new C() {...}" defines an inner class.  But inner classes cannot
> have member interfaces (JLS2 8.1.2) so this code should not compile.
> 
> javac (1.2.2 and 1.3) reports an error but jikes-1.10 (I haven't tried
> newer versions) compiles this code.
> 
> 
>         Juergen



This might be a good time to point out that there is a new
JLS conformance testing project for java compilers
hosted on the IBM oss server. The Jacks project is a part of the
Jikes project, but it also supports other java compilers
(like Sun's javac, GCJ, and the compiler shipped with Kaffe).

This CVS info is:

setenv CVSROOT :pserver:[EMAIL PROTECTED]:/cvs/jikes

cvs login
paswsd anoncvs

cvs checkout jikes jacks

(You only need to check out the jacks module if you do not want
the source code for jikes)

It is very easy to add new JLS conformance tests like the example
given above, and run it with multiple compilers.

Mo DeJong
Red Hat Inc

P.S.
Jikes 1.12 was just released?

http://oss.software.ibm.com/developerworks/opensource/jikes/project/


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to