2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / tests / gtest-451-lib.cs
1 // Compiler options: -t:library -langversion:future
2
3 public struct S
4 {
5 }
6
7 public class B
8 {
9         public static string TestString (string s = "mono")
10         {
11                 return s;
12         }
13
14         public static B TestB (B b = null)
15         {
16                 return b;
17         }
18
19         public static T Test<T> (T t = default (T))
20         {
21                 return t;
22         }
23
24         public static S TestNew (S s = new S ())
25         {
26                 return s;
27         }
28
29         public static decimal TestDecimal (int i, decimal d = decimal.MinValue)
30         {
31                 return d;
32         }
33         
34         char ch;
35         public char this [int id, char v = 'h'] {
36                 get { return v; }
37                 set { ch = value; } 
38         }
39 }