diff options
author | 2015-04-28 19:49:18 -0700 | |
---|---|---|
committer | 2015-04-28 19:49:18 -0700 | |
commit | fc29e6df8a452977d8b7b354b37ac8f2e77b3a4b (patch) | |
tree | c1c34d1c72e36bf36fd3de9e3076c18d848679b1 /Source/Dafny/DafnyAst.cs | |
parent | 8af694583e86b36d8fcc81485ea2f02c9961d96c (diff) | |
parent | 4bb023c9acf460c9cafe69c238996e35f47014bb (diff) |
Merge
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r-- | Source/Dafny/DafnyAst.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs index 792274f8..be2bbe33 100644 --- a/Source/Dafny/DafnyAst.cs +++ b/Source/Dafny/DafnyAst.cs @@ -5226,12 +5226,14 @@ namespace Microsoft.Dafny { return e;
}
- public static Expression VarSubstituter(List<NonglobalVariable> oldVars, List<BoundVar> newVars, Expression e) {
+ public static Expression VarSubstituter(List<NonglobalVariable> oldVars, List<BoundVar> newVars, Expression e, Dictionary<TypeParameter, Type> typeMap=null) {
Contract.Requires(oldVars != null && newVars != null);
Contract.Requires(oldVars.Count == newVars.Count);
Dictionary<IVariable, Expression/*!*/> substMap = new Dictionary<IVariable, Expression>();
- Dictionary<TypeParameter, Type> typeMap = new Dictionary<TypeParameter, Type>();
+ if (typeMap == null) {
+ typeMap = new Dictionary<TypeParameter, Type>();
+ }
for (int i = 0; i < oldVars.Count; i++) {
var id = new IdentifierExpr(newVars[i].tok, newVars[i].Name);
|