summaryrefslogtreecommitdiff
path: root/Source/Dafny/Rewriter.cs
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-04-16 09:50:34 -0700
committerGravatar qunyanm <unknown>2015-04-16 09:50:34 -0700
commitd95b2c8dd46bb52c6c84f2b764d3e6211b403346 (patch)
treea6e44c901525b057117315afbb39511e0ad9613f /Source/Dafny/Rewriter.cs
parent38134c5587ea53e71290e2e8ea9915062172865b (diff)
Fix issue #71. When substitute the forall's variables for those of the
fn in fixupRevealLemma substitute the types as well.
Diffstat (limited to 'Source/Dafny/Rewriter.cs')
-rw-r--r--Source/Dafny/Rewriter.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Dafny/Rewriter.cs b/Source/Dafny/Rewriter.cs
index 091ee24a..72649b5f 100644
--- a/Source/Dafny/Rewriter.cs
+++ b/Source/Dafny/Rewriter.cs
@@ -672,7 +672,8 @@ namespace Microsoft.Dafny
// Substitute the forall's variables for those of the fn
var formals = fn.Formals.ConvertAll<NonglobalVariable>(x => (NonglobalVariable)x);
- reqs = Expression.VarSubstituter(formals, origForall.BoundVars, reqs);
+ var typeMap = Util.Dict<TypeParameter, Type>(fn.TypeArgs, Util.Map(origForall.TypeArgs, x => new UserDefinedType(x)));
+ reqs = Expression.VarSubstituter(formals, origForall.BoundVars, reqs, typeMap);
var newImpl = Expression.CreateImplies(reqs, origImpl.E1);
//var newForall = Expression.CreateQuantifier(origForall, true, newImpl);