diff tests/mini/with2.d @ 704:43165a082535

Fixed issue with accessing a WithStatement context from inside a nested function. see mini/with2.d Renamed some LLVM uses of ::create statics to ::Create , lower case ones will be deprecated soon.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 14 Oct 2008 13:21:14 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/mini/with2.d	Tue Oct 14 13:21:14 2008 +0200
@@ -0,0 +1,17 @@
+struct bar {
+    int bar;
+}
+
+void main() {
+    bar Bar;
+    with (Bar)
+    {
+        assert(Bar.bar == 0);
+        void test()
+        {
+            bar ++;
+        }
+        test();
+    }
+    assert(Bar.bar == 1);
+}