You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
52
mcs/tests/test-default-01.cs
Normal file
52
mcs/tests/test-default-01.cs
Normal file
@ -0,0 +1,52 @@
|
||||
// Compiler options: -langversion:latest
|
||||
|
||||
static class X
|
||||
{
|
||||
const int c1 = default;
|
||||
const int c2 = default (int);
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
int a = default;
|
||||
var b = (int) default;
|
||||
const int c = default;
|
||||
var d = new[] { 1, default };
|
||||
dynamic e = default;
|
||||
int f = checked (default);
|
||||
(int a, int b) g = (1, default);
|
||||
var h = 1 != default;
|
||||
var i = default == M4 ();
|
||||
}
|
||||
|
||||
static int M1 ()
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
static void M2 ()
|
||||
{
|
||||
try {
|
||||
throw new System.Exception ();
|
||||
} catch (System.Exception) when (default) {
|
||||
}
|
||||
|
||||
if (default) {
|
||||
}
|
||||
}
|
||||
|
||||
static void M3 (int x = default)
|
||||
{
|
||||
}
|
||||
|
||||
static System.Func<int> M4 ()
|
||||
{
|
||||
return () => default;
|
||||
}
|
||||
}
|
||||
/*
|
||||
enum E
|
||||
{
|
||||
A = default,
|
||||
B = default + 1
|
||||
}
|
||||
*/
|
Reference in New Issue
Block a user