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

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Test
diff options
context:
space:
mode:
authorJb Evain <jbevain@gmail.com>2012-01-14 14:12:56 +0400
committerJb Evain <jbevain@gmail.com>2012-01-14 14:12:56 +0400
commit854a5c473a236dcda5d107d0939fcc6b9f4b351b (patch)
treebbdfe870413ad80f9cdfbedf96d5a046b5a7dc0b /Test
parent6bb35b1ec97e1aaf838e36912067aeab33cea408 (diff)
Fix TypeDefinition.IsPrimitive for Object
Diffstat (limited to 'Test')
-rw-r--r--Test/Mono.Cecil.Tests/MethodBodyTests.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/MethodBodyTests.cs b/Test/Mono.Cecil.Tests/MethodBodyTests.cs
index 77cbe46..c70b3c2 100644
--- a/Test/Mono.Cecil.Tests/MethodBodyTests.cs
+++ b/Test/Mono.Cecil.Tests/MethodBodyTests.cs
@@ -240,6 +240,18 @@ namespace Mono.Cecil.Tests {
Assert.AreEqual (token, element_type);
}
+ [Test]
+ public void ThisParameterObject ()
+ {
+ var module = typeof (MethodBodyTests).ToDefinition ().Module;
+ var @object = module.TypeSystem.Object.Resolve ();
+ var method = @object.Methods.Where (m => m.HasBody).First ();
+
+ var type = method.Body.ThisParameter.ParameterType;
+ Assert.IsFalse (type.IsValueType);
+ Assert.IsFalse (type.IsPrimitive);
+ }
+
[TestIL ("hello.il")]
public void FilterMaxStack (ModuleDefinition module)
{