summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.compile/SuperConstr.java
blob: eef50508109402a6f94c3013efb33dfa9b5cbc4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
    }
  }
}