Menu ▾ ▴

#34 wrong instance for noninherited member

open
nobody
5
2002-09-09
2002-09-09
No

The Pizza compiler fails the following javac regression
test

/**
* @test @(#)WhichImplicitThis6.java 1.1 02/07/19
* @bug 4717633
* @summary compiler fails to allow access to enclosing
instance in super()
*
* @compile WhichImplicitThis6.java
*/

class WhichImplicitThis6 {
private int i;
WhichImplicitThis6(int i) {}
class Sub extends WhichImplicitThis6 {
Sub() {
super(i); // i is not inherited, so it is
the enclosing i
}
}
}

Discussion


Log in to post a comment.