diff test/classes7.d @ 11:d3ee9efe20e2 trunk

[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing. * Now 50/51 tests compile. * Added a simple runalltests.d scripts that should be run with 'gdmd -run runalltests.d' - LLVMDC will not compile it yet.
author lindquist
date Tue, 02 Oct 2007 05:10:18 +0200
parents
children ee302fe07296
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/classes7.d	Tue Oct 02 05:10:18 2007 +0200
@@ -0,0 +1,21 @@
+module classes7;
+
+class C
+{
+    int i=0;
+    void f()
+    {
+        i=42;
+    }
+    void g()
+    {
+        f();
+    }
+}
+
+void main()
+{
+    scope c = new C;
+    c.g();
+    assert(c.i == 43);
+}