aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs174/pr413378/Code.java
blob: f591dac45c252ae0b47669788969b541c042a120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class Child extends Parent{

    public String mParent = "John";
    
    public Child(String parent) {
        this.mParent = parent;
    }
    
    public String getParent()
    {
        return this.mParent;
    }
}

class Parent {
    private String mName = "John";
    private int mAge = 50;
    
    public int getAge(){
        return mAge;
    }
}

aspect MyTest {

    public Child.new(String parent, int age) {
        this(parent);
        
        System.out.println("Get Age:" + super.getAge());
        System.out.println("Child Name:" + this.mParent);
    }
}

public class Code {
  public static void main(String []argv) {
    new Child("Andy",5);
  }
}