summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-optional-11-lib.cs
blob: 0c944b7cfc22c635a06b5dd49878a4a0e3b1e139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Compiler options: -t:library

using System;
using System.Runtime.InteropServices;

public struct S
{
}

public class Lib
{
	public static int TestA ([Optional][DefaultParameterValue (1)] int u)
	{
		return u;
	}

	public static T TestB<T> (T a, [Optional] T u)
	{
		return u;
	}
	
	public static object TestC ([Optional] object a)
	{
		return a;
	}
	
	public static object TestC2 (object a = null)
	{
		return a;
	}

	public static int TestD ([Optional] int a, int i)
	{
		return a;
	}

	public static void TestS (S s = default (S))
	{
	}
}