summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/PR19870_2.java
blob: 4dd7c7fa9a107e8919b6b9a16cf6c8d6ce129f50 (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
39
// PR19870: Test synthetic accessor generation for private static methods
// accessed across nested class boundaries.
public class PR19870_2
{
  static class A
  {
    private static void foo( )
    {
      System.out.println( "1");
    }

    private static void bar( int x)
    {
      System.out.println( x);
      snafu( );
      PR19870_2.snafu( );
    }
  }

  static class B
  {
    private static void foo( )
    {
      A.foo( );
    }
  }

  private static void snafu( )
  {
    System.out.println( "3");
  }

  public static void main( String[] args)
  {
    A.foo( );
    A.bar( 2);
    B.foo( );
  }
}