You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
95
mcs/tests/test-935.cs
Normal file
95
mcs/tests/test-935.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public delegate void DelegateVoid (int arg);
|
||||
public delegate int DelegateInt (string arg);
|
||||
|
||||
public static int Main ()
|
||||
{
|
||||
Foo (Bar);
|
||||
|
||||
TT (null);
|
||||
NN (0);
|
||||
NN2 (1);
|
||||
Complex (null);
|
||||
MM (1);
|
||||
MM ((byte) 1);
|
||||
DecimalRule (() => (byte) 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void TT (Task<string> a)
|
||||
{
|
||||
}
|
||||
|
||||
static void TT (Task<object> b)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
|
||||
static void NN (sbyte a)
|
||||
{
|
||||
}
|
||||
|
||||
static void NN (uint? b)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
|
||||
static void NN2 (sbyte? a)
|
||||
{
|
||||
}
|
||||
|
||||
static void NN2 (uint? b)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
|
||||
public static void Bar (int arg)
|
||||
{
|
||||
}
|
||||
|
||||
public static int Bar (string arg)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public static void Foo (DelegateVoid input)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
|
||||
public static void Foo (DelegateInt input)
|
||||
{
|
||||
}
|
||||
|
||||
static void Complex (Expression<Func<Task<short>>> arg)
|
||||
{
|
||||
}
|
||||
|
||||
static void Complex (Expression<Func<Task<ulong>>> arg)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
|
||||
static void MM (double f)
|
||||
{
|
||||
}
|
||||
|
||||
static void MM (double? f)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
|
||||
static void DecimalRule (Func<int> i)
|
||||
{
|
||||
}
|
||||
|
||||
static void DecimalRule (Func<decimal?> i)
|
||||
{
|
||||
throw new ApplicationException ("wrong overload");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user