mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
28 lines
401 B
Java
28 lines
401 B
Java
|
import org.aspectj.testing.Tester;
|
||
|
|
||
|
import java.util.*;
|
||
|
|
||
|
public class InnerAccess {
|
||
|
public static void main(String[] args) {
|
||
|
Tester.checkEqual(new C().getCount(), 2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
class C {
|
||
|
protected int i = 2;
|
||
|
private String s = "hi";
|
||
|
|
||
|
public int getCount() {
|
||
|
return new Object() {
|
||
|
public int m() {
|
||
|
return s.length();
|
||
|
}
|
||
|
}.m();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
class D implements Map.Entry {
|
||
|
}
|