aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/bugs/lists/case2/IdentifiableAspect.java
blob: bbf593657805590e366dd1fb8c0a1eafa12a8417 (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");
  }
}