Fix bug #566087.
[mcs.git] / tests / gtest-optional-04.cs
blobf15fd54068adf1a51d473d113bf0ec1b28b47c18
1 using System;
3 public class C
5 static void Foo<T> (T t, T u = default (T))
9 static void TestParams (params int[] i)
11 throw new ApplicationException ();
14 static void TestParams (int i = 4)
18 static void TestStruct (int? s = new int ())
22 public string this [int i, string s = "test"] {
23 get { return s; }
24 set { value = s; }
27 public static int Main ()
29 Foo ("f");
30 Foo (2);
31 Foo (2, 4);
32 Foo<long> (2);
33 Foo<string> ("2", "3");
35 TestParams ();
37 TestStruct ();
39 C c = new C ();
40 if (c [1] != "test")
41 return 1;
43 c [3] = "value";
45 return 0;