summaryrefslogtreecommitdiff
path: root/Source/Dafny/Resolver.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2015-08-20 11:49:24 -0700
committerGravatar Rustan Leino <unknown>2015-08-20 11:49:24 -0700
commit270b34fc36dcfc781e8f49df5339cb2e10e69828 (patch)
treefdf0ff7860d19e01b806f1fe0a4db54d71654c11 /Source/Dafny/Resolver.cs
parenteb146ddaa09123f57b963fd85845c944a73a23cb (diff)
Fixed bug in type unification
Diffstat (limited to 'Source/Dafny/Resolver.cs')
-rw-r--r--Source/Dafny/Resolver.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index 58984b9b..2f2b5a54 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -4574,8 +4574,11 @@ namespace Microsoft.Dafny
} else if (a is CollectionTypeProxy) {
if (b is CollectionTypeProxy) {
- a.T = b;
- return UnifyTypes(((CollectionTypeProxy)a).Arg, ((CollectionTypeProxy)b).Arg);
+ var argUnificationSuccess = UnifyTypes(((CollectionTypeProxy)a).Arg, ((CollectionTypeProxy)b).Arg);
+ if (argUnificationSuccess) {
+ a.T = b;
+ }
+ return argUnificationSuccess;
} else if (b is OperationTypeProxy) {
var proxy = (OperationTypeProxy)b;
if (proxy.AllowSeq && proxy.AllowSetVarieties && proxy.AllowISet) {