Skip to content

Commit 9376e0b

Browse files
committed
changed dictionary keys from VBComponent to QualifiedModuleName
1 parent 8bb5c88 commit 9376e0b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Rubberduck.Parsing/VBA/RubberduckParserState.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public sealed class RubberduckParserState
6363
private readonly ConcurrentDictionary<QualifiedModuleName, IList<CommentNode>> _comments =
6464
new ConcurrentDictionary<QualifiedModuleName, IList<CommentNode>>();
6565

66+
private readonly ConcurrentDictionary<QualifiedModuleName, IList<IAnnotation>> _annotations =
67+
new ConcurrentDictionary<QualifiedModuleName, IList<IAnnotation>>();
68+
6669
private readonly ConcurrentDictionary<QualifiedModuleName, SyntaxErrorException> _moduleExceptions =
6770
new ConcurrentDictionary<QualifiedModuleName, SyntaxErrorException>();
6871

@@ -252,7 +255,7 @@ public IEnumerable<IAnnotation> AllAnnotations
252255
public IEnumerable<IAnnotation> GetModuleAnnotations(VBComponent component)
253256
{
254257
IList<IAnnotation> result;
255-
if (_annotations.TryGetValue(component, out result))
258+
if (_annotations.TryGetValue(new QualifiedModuleName(component), out result))
256259
{
257260
return result;
258261
}
@@ -262,7 +265,7 @@ public IEnumerable<IAnnotation> GetModuleAnnotations(VBComponent component)
262265

263266
public void SetModuleAnnotations(VBComponent component, IEnumerable<IAnnotation> annotations)
264267
{
265-
_annotations[component] = annotations.ToList();
268+
_annotations[new QualifiedModuleName(component)] = annotations.ToList();
266269
}
267270

268271
/// <summary>

0 commit comments

Comments
 (0)