* libjava.compile/SuperConstr.java: New test case.
From-SVN: r38793
This commit is contained in:
parent
0c58da3ed0
commit
4fd297757d
2 changed files with 24 additions and 0 deletions
20
libjava/testsuite/libjava.compile/SuperConstr.java
Normal file
20
libjava/testsuite/libjava.compile/SuperConstr.java
Normal file
|
@ -0,0 +1,20 @@
|
|||
// It is legal to reference "this" from an enclosing type, or an instance
|
||||
// field from an enclosing type, in a super constructor call.
|
||||
|
||||
public class SuperConstr
|
||||
{
|
||||
SuperConstr (Object x, Outer y) {}
|
||||
}
|
||||
|
||||
class Outer
|
||||
{
|
||||
Object x;
|
||||
|
||||
class Sub extends SuperConstr
|
||||
{
|
||||
Sub()
|
||||
{
|
||||
super(x, Outer.this);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue