summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGravatar Michael Lowell Roberts <mirobert@microsoft.com>2015-07-15 10:30:35 -0700
committerGravatar Michael Lowell Roberts <mirobert@microsoft.com>2015-07-15 10:30:35 -0700
commit6138ea13b5116eef41eeec5b59a13cc9c12ffcfa (patch)
tree22ab8be9e2c5362a8c98dc9bf88a5f305184ee11 /Source
parentfe501d243c0413db8ae85bda174d0761da00d330 (diff)
[IronDafny] fix for ambiguous identifier error.
Diffstat (limited to 'Source')
-rw-r--r--Source/Dafny/Resolver.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index 460859db..78bc02ff 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -931,7 +931,11 @@ namespace Microsoft.Dafny
if (useImports || string.Equals(kv.Key, "_default", StringComparison.InvariantCulture)) {
TopLevelDecl d;
if (sig.TopLevels.TryGetValue(kv.Key, out d)) {
- sig.TopLevels[kv.Key] = AmbiguousTopLevelDecl.Create(moduleDef, d, kv.Value);
+ if (DafnyOptions.O.IronDafny && kv.Value.ClonedFrom == d) {
+ sig.TopLevels[kv.Key] = kv.Value;
+ } else {
+ sig.TopLevels[kv.Key] = AmbiguousTopLevelDecl.Create(moduleDef, d, kv.Value);
+ }
} else {
sig.TopLevels.Add(kv.Key, kv.Value);
}