Update of /cvsroot/nice/Nice/testsuite/compiler/classes/constructors
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15364/testsuite/compiler/classes/constructors
Modified Files:
custom.testsuite
Log Message:
Correctly generate code for method references from inside custom constructors
and instance initializers (fixes #969777).
Index: custom.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/constructors/custom.testsuite,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** custom.testsuite 22 Dec 2003 20:28:10 -0000 1.10
--- custom.testsuite 11 Jun 2004 05:01:38 -0000 1.11
***************
*** 98,99 ****
--- 98,119 ----
A<String> a = new A(x: 5, z: "abc");
A<String> b = new A(str: "5", t: "abc");
+
+ /// PASS
+ // bug #969777
+ let b = new B();
+ // Usage of closure inside a custom constructor
+ /// Toplevel
+ class A {
+ void foo() {}
+ }
+
+ class B extends A {
+ void fooB() = this.foo();
+ }
+
+ void fst(int i) {}
+
+ new B(int x) {
+ [x].foreach(fst);
+ this();
+ }
|