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:
authorRaja R Harinath <harinath@hurrynot.org>2004-04-21 11:48:42 +0400
committerRaja R Harinath <harinath@hurrynot.org>2004-04-21 11:48:42 +0400
commit550e65d26a0669eb7beb4e60c5a222c7caeb66ff (patch)
treed3a566964369ff94c2b6e1bf161e3acb23bb2a57 /mcs/tests/test-237.cs
parent71e8b0a51d64c222c8fbfc57a551dc0bc6eae5ce (diff)
Test for #56442.
svn path=/trunk/mcs/; revision=25764
Diffstat (limited to 'mcs/tests/test-237.cs')
-rw-r--r--mcs/tests/test-237.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/mcs/tests/test-237.cs b/mcs/tests/test-237.cs
new file mode 100644
index 00000000000..44efda93c69
--- /dev/null
+++ b/mcs/tests/test-237.cs
@@ -0,0 +1,25 @@
+// Test for bug #56442
+
+public class Params
+{
+ public static readonly object[] test = new object[] { 1, "foo", 3.14 };
+ public static readonly object[] test_types = new object[] { typeof(int), typeof(string), typeof(double) };
+
+ public delegate void FOO(string s, params object[] args);
+
+ public static void foo(string s, params object[] args)
+ {
+ if (args.Length != test.Length)
+ throw new System.Exception("Length mismatch during " + s + " invocation");
+ for (int i = 0; i < args.Length; ++i)
+ if (args[i].GetType() != test_types[i])
+ throw new System.Exception("Type mismatch: " + args[i].GetType() + " vs. " + test_types[i]);
+ }
+
+ public static void Main()
+ {
+ foo("normal", test);
+ FOO f = new FOO(foo);
+ f("delegate", test);
+ }
+}