Merge pull request #3563 from lewurm/interpreter
[mono.git] / mcs / tests / gtest-optional-15.cs
1 using System;
2 using System.Reflection;
3
4 struct S
5 {
6 }
7
8 class Program
9 {
10         public static void Test (S s = default (S))
11         {
12         }
13
14         public static int Main ()
15         {
16                 var t = typeof (Program).GetMethod ("Test");
17                 var p = t.GetParameters ()[0];
18                 if (p.RawDefaultValue != null)
19                         return 1;
20                 
21                 if (p.Attributes != (ParameterAttributes.Optional | ParameterAttributes.HasDefault))
22                         return 2;
23                 
24                 return 0;
25         }
26 }