On Thu, Aug 03, 2000 at 08:23:47PM +0000, Dimitris Vyzovitis wrote:
> I am getting a very strange error with javac of blackdown 1.2.2RC4 (I
> haven't tested with the FCS yet), that does not occur with jikes or the
> javac that comes with ibm's jdk 1.3.
>
> The problem is illustrated by the following:
>
> file a.java:
> interface a {
>
> interface b {
>
> public static final String test = "test";
>
> }
>
> }
>
> file c.java:
it seems needs look like that, is'nt it?
public class c implements a {
public static void main( String[] args ) {
System.out.println( a.b.test );
}
}
>
> If you try to compile those files with jikes or ibm's javac, everything
> works smoothly.
> However, if your do so with blackdown's 1.2.2RC4, the following error
> occurs:
> [dimitris@gauss bugs]$ javac a.java c.java
> c.java:4: Undefined variable or class name: b
> System.out.println( b.test );
> ^
> 1 error
>
> Obviously, this is not the correct behavior, since b is a static
> sub-interface of a, of which c is an instance. So b should a type
> directly accessible to c.
> Hence, I believe that the compilation should not produce any problems
> (this is the behavior of jikes and ibm's javac).
> And, to strengthen this argument, if I change b.test to a.b.test the
> program compiles normally.
> Any comments?
>
>
> -- dimitris
> mailto:[EMAIL PROTECTED]
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
--
Alexander Davydenko |
[EMAIL PROTECTED], [EMAIL PROTECTED] | Moscow, USSR
-------------------------------------------------------------------------
<<<<< Powered by Linux & 220V >>>>>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]