summaryrefslogtreecommitdiff
path: root/Source/VCExpr/NameClashResolver.cs
diff options
context:
space:
mode:
authorGravatar MichalMoskal <unknown>2010-12-10 03:00:48 +0000
committerGravatar MichalMoskal <unknown>2010-12-10 03:00:48 +0000
commitfb350c313ff20b5a6de330e23d2c4577907070d7 (patch)
treec8f17e6c5a04b8b8a607127a15d5af88897ba168 /Source/VCExpr/NameClashResolver.cs
parentd67cdef612efcfc6fbd27f14db712357b24552ba (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.cs5
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() + "@@";
}
}
}