You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/FastExpressionCompiler.IssueTests/Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.cs
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
+
#if NET8_0_OR_GREATER
1
2
usingSystem;
3
+
usingSystem.Reflection.Emit;
2
4
usingSystem.Text.Json;
3
5
4
6
#if LIGHT_EXPRESSION
@@ -42,12 +44,36 @@ public void Original_case(TestContext t)
42
44
43
45
// the compiled function should return default(int), yet it calls reader.GetInt32 instead
44
46
vara=fs(refreader);
47
+
fs.AssertOpCodes(
48
+
OpCodes.Ldarg_1,// at IL_0000
49
+
OpCodes.Call,// JsonTokenType Utf8JsonReader.get_TokenType() at IL_0001
50
+
OpCodes.Ldc_I4_S,// 11 at IL_0006
51
+
OpCodes.Bne_Un,// IL_0019 at IL_0008
52
+
OpCodes.Ldc_I4_0,// at IL_0013
53
+
OpCodes.Br,// IL_0025 at IL_0014
54
+
OpCodes.Ldarg_1,// at IL_0019
55
+
OpCodes.Call,// int Utf8JsonReader.GetInt32() at IL_0020
0 commit comments