From 2a85e7f27bb5a708bdca5d93888551a87ddbfd6f Mon Sep 17 00:00:00 2001 From: Julien Couvreur Date: Tue, 26 Nov 2024 02:45:39 -0800 Subject: [PATCH] Tweak --- src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs index b068b11a0727b..64beb1980edb1 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs @@ -4808,6 +4808,9 @@ .maxstack 2 System.Console.Write(object.ReferenceEquals(enumerable, enumerable.GetEnumerator())); } +enumerator.Dispose(); +System.Console.Write(object.ReferenceEquals(enumerable, enumerable.GetEnumerator())); + class C { public static System.Collections.Generic.IEnumerable Produce() @@ -4819,7 +4822,7 @@ public static System.Collections.Generic.IEnumerable Produce() """; // We're not setting the state to "after"/"finished" // Tracked by https://github.com/dotnet/roslyn/issues/76089 - CompileAndVerify(src2, expectedOutput: "TrueTrueFalse").VerifyDiagnostics(); + CompileAndVerify(src2, expectedOutput: "TrueTrueFalseTrue").VerifyDiagnostics(); } [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/76078")]