gcc/libjava/testsuite/libjava.lang/PR19870_2.java
Ranjit Mathew 8a14e6e1ac More testsuite adjustments for PR java/19870.
* testsuite/libjava.lang/PR19870_2.java: New testcase.
	* testsuite/libjava.lang/PR19870_2.out: Expected output for the
	new testcase.
	* testsuite/libjava.jacks/jacks.xfail: Remove
	8.5.2-non-static-member-usage-2 and add 15.12.3-explicit-constructor-9.

From-SVN: r103165
2005-08-16 18:32:14 +00:00

40 lines
615 B
Java

// 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( );
}
}