Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mono.Cecil/AssemblyReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,7 @@ ConstantDebugInformation ReadLocalConstant (uint rid)
value = new decimal (signature.ReadInt32 (), signature.ReadInt32 (), signature.ReadInt32 (), (b & 0x80) != 0, (byte) (b & 0x7f));
} else if (type.IsTypeOf ("System", "DateTime")) {
value = new DateTime (signature.ReadInt64());
} else if (type.etype == ElementType.Object || type.etype == ElementType.None || type.etype == ElementType.Class) {
} else if (type.etype == ElementType.Object || type.etype == ElementType.None || type.etype == ElementType.Class || type.etype == ElementType.Array) {
value = null;
} else
value = signature.ReadConstantSignature (type.etype);
Expand Down
8 changes: 8 additions & 0 deletions Test/Mono.Cecil.Tests/ImageReadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ public void Net471TargetingAssembly ()
});
}

[Test]
public void LocallyScopedConstantArray ()
{
TestModule ("LocallyScopedConstantArray.dll", module => {
Assert.IsTrue (module.HasDebugHeader);
Comment thread
SimonCropp marked this conversation as resolved.
Resolved
}, symbolReaderProvider: typeof (PortablePdbReaderProvider), symbolWriterProvider: typeof (PortablePdbWriterProvider));
}

[Test]
public void ExternalPdbDeterministicAssembly ()
{
Expand Down
Binary file not shown.
Binary file not shown.