From 4c4647bbd61883edee6f55d5dc37c9649d23af2e Mon Sep 17 00:00:00 2001 From: qunyanm Date: Thu, 7 Jan 2016 16:43:53 -0800 Subject: Fix issue 118. When iteratively computing bounds, treat RefBoundedPool typed bound as undetermined so that iteration will continue. --- Source/Dafny/Resolver.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs index 9dc0f829..79f1e7e1 100644 --- a/Source/Dafny/Resolver.cs +++ b/Source/Dafny/Resolver.cs @@ -9771,11 +9771,14 @@ namespace Microsoft.Dafny bests = all.ConvertAll(tup => ComprehensionExpr.BoundedPool.GetBest(tup.Item2, onlyFiniteBounds)); // check to see if we found new bounds in this iteration int count = 0; + // figure out how many bounds are not determined yet. for (int i = 0; i < bests.Count; i++) { - if (bests[i] == null) { + if (bests[i] == null || (bests[i] is ComprehensionExpr.RefBoundedPool)) { count++; } } + // if there are bounds that are not determined yet and the number of undetermined bounds + // changed, we will need to do another iteration. if (count >0 && count != orgCount) { changed = true; knownBounds = bests; -- cgit v1.2.3