From 12c28b0c769090a4d444cd31d7e871f707dd06a1 Mon Sep 17 00:00:00 2001 From: MichalMoskal Date: Fri, 17 Dec 2010 00:33:08 +0000 Subject: Add functions generated in lambda-expansion of function body to top-level program declarations. --- Source/BoogieDriver/BoogieDriver.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/BoogieDriver') diff --git a/Source/BoogieDriver/BoogieDriver.cs b/Source/BoogieDriver/BoogieDriver.cs index 98c1b9da..ab930f22 100644 --- a/Source/BoogieDriver/BoogieDriver.cs +++ b/Source/BoogieDriver/BoogieDriver.cs @@ -489,7 +489,9 @@ namespace Microsoft.Boogie { return PipelineOutcome.FatalError; } - foreach (Declaration decl in program.TopLevelDeclarations) { + // operate on a stable copy, in case it gets updated while we're running + var decls = program.TopLevelDeclarations.ToArray(); + foreach (Declaration decl in decls) { Contract.Assert(decl != null); Implementation impl = decl as Implementation; if (impl != null && CommandLineOptions.Clo.UserWantsToCheckRoutine(cce.NonNull(impl.Name)) && !impl.SkipVerification) { -- cgit v1.2.3