You've already forked linux-packaging-mono
Imported Upstream version 3.12.0
Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
42
mcs/tests/test-async-76.cs
Normal file
42
mcs/tests/test-async-76.cs
Normal file
@ -0,0 +1,42 @@
|
||||
// Compiler options: -r:../class/lib/net_4_5/Mono.Cecil.dll
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Mono.Cecil;
|
||||
|
||||
namespace N
|
||||
{
|
||||
class C
|
||||
{
|
||||
}
|
||||
|
||||
interface I<T>
|
||||
{
|
||||
void Foo (T t);
|
||||
}
|
||||
|
||||
class X : I<C>
|
||||
{
|
||||
async void I<C>.Foo (C c)
|
||||
{
|
||||
await Task.Delay (1);
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
var assembly = AssemblyDefinition.ReadAssembly (typeof (X).Assembly.Location);
|
||||
foreach (var t in assembly.MainModule.Types) {
|
||||
PrintType (t, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void PrintType (TypeDefinition td, int indent)
|
||||
{
|
||||
if (td.IsNested && !string.IsNullOrEmpty (td.Namespace))
|
||||
throw new ApplicationException ("BROKEN NESTED TYPE:");
|
||||
Console.WriteLine ("{2} Namespace: {0} Name: {1}", td.Namespace, td.Name, new string (' ', indent * 4));
|
||||
foreach (var tn in td.NestedTypes)
|
||||
PrintType (tn, indent + 1);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user