I believe there are some scoping bugs in the 1.3 prototype compiler.
First, note that this is illegal:
class A { interface I {} }
class B extends A implements I {}
Although B inherits I, I is not in scope for the header of B.
Next, consider
class A { interface I {} }
class B extends A implements A.I {}
The compiler now accepts this example, since A is in scope, and A.I exists.
Now, what about
class A { interface I {} }
class B extends A implements B.I {}
This should also compile (for the same reason as the last example), but the prototype compiler rejects it saying I does not exist! This is the first bug.
We move on to this example:
class A { interface I {} }
class B<T extends I> extends A {}
The prototype compiler accepts this example. But remembering the first example, I is not yet in scope in the class header, so this should be rejected. Second bug.
To make matters more confusing:
class C<T> {
class T {}
T t;
}
What is the type of t? The prototype compiler accepts this, and gives it type Object (as the erasure of parameter T) rather than C.T.
On the other hand,
class C {
<T> void m() {
class T {}
T t;
}
}
Again, what is the type of t? The prototype compiler rejects this, stating that local class T conflicts with method type parameter T. Based on consistency, either the previous example or this example has a bug. I would prefer that the previous example be a compile error like this example is; if a type parameter and nested type share the same scope, they should not share the same name.