Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gen-constraints1.il « tests « ilasm « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1c791f7529053846eb057e9c8d4bc2a989c8fcef (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Test for constraints on generic parameters

.assembly extern mscorlib
{
  .ver 2:0:0:0
}
.assembly 'const'
{
  .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() =  (
		01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   
		63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) 

  .ver  0:0:0:0
}
.module const.dll

  .class interface private auto ansi abstract ITest1
  {
  } 

  .class interface private auto ansi abstract ITest
  {
  } 

  .class private auto ansi beforefieldinit bb
  	extends [mscorlib]System.Object
  {
    .method public hidebysig  specialname  rtspecialname 
           instance default void .ctor ()  cil managed 
    {
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void object::.ctor()
	IL_0006:  ret 
    } 

  } 

  /* Constraints : .ctor, base class, interfaces */
  .class private auto ansi beforefieldinit gen`1 <.ctor (class bb, class [mscorlib]System.Collections.Generic.ICollection`1<!T>, class [mscorlib]System.Collections.ICollection, class ITest1) T>
  	extends [mscorlib]System.Object
  {
    .method public hidebysig  specialname  rtspecialname 
           instance default void .ctor ()  cil managed 
    {
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void object::.ctor()
	IL_0006:  ret 
    } 
    
    /* Constraints on a method's generic params */
    .method public hidebysig 
           instance default void foo<.ctor (class [mscorlib]System.Collections.Generic.ICollection`1<!!0>) M> ()  cil managed 
    {
	.maxstack 8
	IL_0000:  ret 
    }

  } 

  /* Constraint : class */
  .class private auto ansi beforefieldinit foo`1<class M>
  	extends [mscorlib]System.Object
  {
    .method public hidebysig  specialname  rtspecialname 
           instance default void .ctor ()  cil managed 
    {
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void object::.ctor()
	IL_0006:  ret 
    } 

  } 

  /* Constraint : valuetype */
  .class private auto ansi beforefieldinit bar`1<valuetype M>
  	extends [mscorlib]System.Object
  {
    .method public hidebysig  specialname  rtspecialname 
           instance default void .ctor ()  cil managed 
    {
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void object::.ctor()
	IL_0006:  ret 
    } 

  } 

  /* Constraint : generic constraint */
  .class private auto ansi beforefieldinit abc`1 <(class foo`1<class bb>) M>
  	extends [mscorlib]System.Object
  {
    .method public hidebysig  specialname  rtspecialname 
           instance default void .ctor ()  cil managed 
    {
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void object::.ctor()
	IL_0006:  ret 
    } 

  }