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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/ilasm/tests/generics-c.il')
-rw-r--r--mcs/ilasm/tests/generics-c.il42
1 files changed, 42 insertions, 0 deletions
diff --git a/mcs/ilasm/tests/generics-c.il b/mcs/ilasm/tests/generics-c.il
new file mode 100644
index 00000000000..71595d39e00
--- /dev/null
+++ b/mcs/ilasm/tests/generics-c.il
@@ -0,0 +1,42 @@
+//
+// Test a generic type type param field
+//
+
+.assembly extern mscorlib { }
+
+
+.namespace Mono.ILASM.Tests {
+
+ .class public Set<T> extends [mscorlib]System.Object {
+
+ .field public !0 val
+
+ .method public instance void .ctor () {
+ ret
+ }
+ }
+
+ .class public Driver extends [mscorlib]System.Object {
+
+ .method public static void Main ()
+ {
+ .entrypoint
+ .locals init (class Mono.ILASM.Tests.Set<int32>)
+
+ newobj instance void class Mono.ILASM.Tests.Set<int32>::.ctor ()
+ stloc.0
+
+ ldloc.0
+ ldc.i4.1
+ stfld int32 class Mono.ILASM.Tests.Set<int32>::val
+
+ ldloc.0
+ ldfld int32 class Mono.ILASM.Tests.Set<int32>::val
+ call void [mscorlib]System.Console::WriteLine (int32)
+
+ ret
+ }
+
+ }
+}
+