* test-162.cs: Added testcases for structs containing other
structs as fields. Bug #42597.
svn path=/trunk/mcs/; revision=14679
+2003-05-19 Martin Baulig <martin@ximian.com>
+
+ * test-162.cs: Added testcases for structs containing other
+ structs as fields. Bug #42597.
+
2003-05-18 Martin Baulig <martin@ximian.com>
* test-154.cs: Added testcase for bug #41657.
{ }
}
+struct D
+{
+ public int foo;
+}
+
+struct E
+{
+ public D d;
+ public bool e;
+}
+
+struct F
+{
+ public E e;
+ public float f;
+}
+
class X
{
static void test_output (A x)
- {
- }
+ { }
static void test_output (B y)
- {
- }
+ { }
+
+ static void test_output (E e)
+ { }
+
+ static void test_output (F f)
+ { }
static void test1 ()
{
y.a = 1;
}
+ static void test7 ()
+ {
+ E e;
+ e.e = true;
+ e.d.foo = 5;
+
+ test_output (e);
+ }
+
+ static void test8 ()
+ {
+ F f;
+ f.e.e = true;
+ f.e.d.foo = 5;
+ f.f = 3.14F;
+
+ test_output (f);
+ }
+
public static int Main ()
{
// Compilation-only test.