mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 16:09:45 +08:00
de9127c1b7
* 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
34 lines
797 B
Java
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;
|
|
}
|