diff options
author | MichalMoskal <unknown> | 2010-12-10 03:00:48 +0000 |
---|---|---|
committer | MichalMoskal <unknown> | 2010-12-10 03:00:48 +0000 |
commit | fb350c313ff20b5a6de330e23d2c4577907070d7 (patch) | |
tree | c8f17e6c5a04b8b8a607127a15d5af88897ba168 /Source/VCExpr/NameClashResolver.cs | |
parent | d67cdef612efcfc6fbd27f14db712357b24552ba (diff) |
Use a made-up name when Context.Lookup() cannot find a name
Diffstat (limited to 'Source/VCExpr/NameClashResolver.cs')
-rw-r--r-- | Source/VCExpr/NameClashResolver.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/VCExpr/NameClashResolver.cs b/Source/VCExpr/NameClashResolver.cs index f2590948..557171d1 100644 --- a/Source/VCExpr/NameClashResolver.cs +++ b/Source/VCExpr/NameClashResolver.cs @@ -169,7 +169,10 @@ namespace Microsoft.Boogie.VCExprAST { public string Lookup(Object thingie) {
Contract.Requires(thingie != null);
Contract.Ensures(Contract.Result<string>() != null);
- return GlobalPlusLocalNames[thingie];
+ string name;
+ if (GlobalPlusLocalNames.TryGetValue(thingie, out name))
+ return name;
+ return "@@undefined@@" + thingie.GetHashCode() + "@@";
}
}
}
|