From 6138ea13b5116eef41eeec5b59a13cc9c12ffcfa Mon Sep 17 00:00:00 2001 From: Michael Lowell Roberts Date: Wed, 15 Jul 2015 10:30:35 -0700 Subject: [IronDafny] fix for ambiguous identifier error. --- Source/Dafny/Resolver.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source') 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); } -- cgit v1.2.3