diff options
author | Jb Evain <jbevain@gmail.com> | 2012-01-14 14:12:56 +0400 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2012-01-14 14:12:56 +0400 |
commit | 854a5c473a236dcda5d107d0939fcc6b9f4b351b (patch) | |
tree | bbdfe870413ad80f9cdfbedf96d5a046b5a7dc0b /Test | |
parent | 6bb35b1ec97e1aaf838e36912067aeab33cea408 (diff) |
Fix TypeDefinition.IsPrimitive for Object
Diffstat (limited to 'Test')
-rw-r--r-- | Test/Mono.Cecil.Tests/MethodBodyTests.cs | 12 |
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) { |