Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7a749e0

Browse files
committed
Fix Jit assert failure in struct serialization tests due to missing cast
1 parent 85737fd commit 7a749e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Xml.XmlSerializer/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2483,9 +2483,9 @@ internal void ILGenForCreateInstance(CodeGenerator ilg, Type type, Type cast, bo
24832483
);
24842484
ilg.Ldc(type);
24852485
ilg.Call(Activator_CreateInstance);
2486+
ilg.MarkLabel(labelReturn);
24862487
if (cast != null)
24872488
ilg.ConvertValue(Activator_CreateInstance.ReturnType, cast);
2488-
ilg.MarkLabel(labelReturn);
24892489
}
24902490

24912491
internal void WriteLocalDecl(string variableName, SourceInfo initValue)

0 commit comments

Comments
 (0)