diff test/d.d @ 73:b706170e24a9 trunk

[svn r77] Fixed foreach on slice. Fixed some nested function problems when accessing outer function parameters. Major changes to handling of structs. Initial support for unions. Probably more...
author lindquist
date Wed, 31 Oct 2007 03:11:32 +0100
parents c53b6e3fe49a
children
line wrap: on
line diff
--- a/test/d.d	Mon Oct 29 03:28:12 2007 +0100
+++ b/test/d.d	Wed Oct 31 03:11:32 2007 +0100
@@ -1,9 +1,8 @@
 module d;
-/*
+
 void main()
 {
     int delegate() dg;
-    int i = dg();
 
     struct S
     {
@@ -19,17 +18,19 @@
 
     S s;
     auto dg2 = &s.func;
-    i = dg2();
+    int i = dg2();
+    assert(i == 42);
 
     i = f(dg2, 1);
+    assert(i == 43);
 }
 
 int f(int delegate() dg, int i)
 {
     return dg() + i;
 }
-*/
 
+/*
 struct S
 {
     int i;
@@ -46,3 +47,4 @@
 {
     auto dg = &s.square;
 }
+*/
\ No newline at end of file