Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2013-01-31 15:31:35 +0400
committerMarek Safar <marek.safar@gmail.com>2013-01-31 15:32:06 +0400
commit7ae364c9c3c974d813f74e09d3d1c482bb0e4a6f (patch)
tree0ccf9aecd135637281d6288c8603709367db644a /mcs/tests/dtest-058.cs
parentc7b3142f7ae1e03b34a2810681d1c5f3cb6da9d5 (diff)
Emit field initializers when the ctor has dynamic arguments. Fixes #9683
Diffstat (limited to 'mcs/tests/dtest-058.cs')
-rw-r--r--mcs/tests/dtest-058.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/tests/dtest-058.cs b/mcs/tests/dtest-058.cs
new file mode 100644
index 00000000000..23dedf09af2
--- /dev/null
+++ b/mcs/tests/dtest-058.cs
@@ -0,0 +1,30 @@
+using System;
+
+class Test
+{
+ int a;
+ int b;
+
+ Test (int i)
+ {
+ a = 10;
+ }
+
+ static Test Foo (dynamic d)
+ {
+ return new Test (d) {
+ b = 20
+ };
+ }
+
+ public static int Main ()
+ {
+ var t = Foo (44);
+ if (t.a != 10)
+ return 1;
+ if (t.b != 20)
+ return 2;
+
+ return 0;
+ }
+}