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

Commit 540c478

Browse files
committed
Move up label marker to proper location
1 parent 629d883 commit 540c478

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Implement.Net/TypeFactory.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ private static void ImplementDisposeAsync(TypeBuilder typeBuilder, FieldInfo han
695695

696696
if (checkInstance) {
697697
// } else { // this.[handlerField] is not IAsyncDisposable
698+
generator.MarkLabel(disposeSyncLabel);
698699

699700
// if we don't know whether the handler is IDisposable for sure, we need to check the instance once again
700701
if (!isAlwaysSyncDisposable) {
@@ -707,8 +708,6 @@ private static void ImplementDisposeAsync(TypeBuilder typeBuilder, FieldInfo han
707708
generator.Emit(OpCodes.Brfalse_S, doNothingLabel);
708709
}
709710

710-
generator.MarkLabel(disposeSyncLabel);
711-
712711
// this.[handlerField].Dispose();
713712
generator.Emit(OpCodes.Ldarg_0);
714713
generator.Emit(OpCodes.Ldfld, handlerField);

0 commit comments

Comments
 (0)