diff tests/code/struct_4.d @ 39:1a7a308f75b2 new_gen

Added some struct tests, and implemented a wrong struct assignment It assumes 8 bytes for all struct, we have no DType available at that point Slight improvement to an error message (Member access to unknown members)
author Anders Halager <halager@gmail.com>
date Mon, 21 Apr 2008 22:47:12 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/code/struct_4.d	Mon Apr 21 22:47:12 2008 +0200
@@ -0,0 +1,18 @@
+
+struct A
+{
+    int a;
+}
+
+struct B
+{
+    int b;
+    A a;
+}
+
+void main()
+{
+    B b;
+    b.a.a = 1;
+    b.b = 2;
+}