aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/bugs/lists/case3/IdentifiableAspect.java
blob: a9cb3f73fbaeda6f068722993433beb56c10fe2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public aspect IdentifiableAspect {
    declare parents: Bean implements LongIdentifiable;

    private Long LongIdentifiable.m_id;

    public Long LongIdentifiable.getId() {
        return m_id;
    }

    public void LongIdentifiable.setId(Long id) {
        m_id= id;
    }

  public static void main(String []argv) {
    Bean b = new Bean();
    b.setId(37L);
    long l = b.getId();
    if (l!=37L) throw new RuntimeException("id should be 37");
  }
}