Skip to content

Commit 58cca84

Browse files
author
Maksim Volkau
committed
trying the fix
1 parent 7b201f2 commit 58cca84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/FastExpressionCompiler/FastExpressionCompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5055,7 +5055,7 @@ public static bool TryEmitMemberGet(MemberExpression expr,
50555055
// Value type special treatment to load address of value instance in order to call a method.
50565056
// For the parameters, we will skip the address loading because the `LastEmitIsAddress == true` for `Ldarga`,
50575057
// so the condition here will be skipped
5058-
if (!closure.LastEmitIsAddress && !objExpr.Type.IsByRef && objExpr.Type.IsValueType)
5058+
if (!closure.LastEmitIsAddress && objExpr.Type.IsValueType && !(objExpr is PE pe && pe.IsByRef))
50595059
EmitStoreAndLoadLocalVariableAddress(il, objExpr.Type);
50605060
}
50615061

0 commit comments

Comments
 (0)