gcc/libjava/testsuite/libjava.lang/anfi.java
Alexandre Petit-Bianco de9127c1b7 instinit2.out: New file.
* libjava.lang/instinit2.out: New file.
	* libjava.lang/instinit2.java: New file.
	* libjava.lang/instinit.out: New file.
	* libjava.lang/instinit.java: New file.
	* libjava.lang/anonarray2.out: New file.
	* libjava.lang/anonarray2.java: New file.
	* libjava.lang/anonarray.out: New file.
	* libjava.lang/anonarray.java: New file.
	* libjava.lang/nested_with_ctor.out: New file.
	* libjava.lang/nested_with_ctor.java: New file.
	* libjava.lang/anfi.out: New file.
	* libjava.lang/anfi.java: New file.
	* libjava.lang/stub.out: New file.
	* libjava.lang/stub.java: New file.

From-SVN: r31841
2000-02-07 21:40:18 +00:00

34 lines
797 B
Java

// Class anfi
// Generated on Sat Jan 29 16:06:33 PST 2000
// Anonymous with access to outer context locals
class anfi {
itf foo (final String s, final int i) {
return new itf () {
String buff = s+" "+i;
public void setString (String s) { buff = s+" "+i; }
public String getString () { return buff; }
};
}
void test () {
itf x = foo ("Hello", 123);
System.out.println (x.getString ());
x.setString ("Frinkahedron");
System.out.println (x.getString ());
}
public static void main (String[] arg)
{
System.out.println ("Testing class `anfi'...");
new anfi().test();
}
}
interface itf {
void setString (String s);
String getString();
String buff = null;
}