Skip to content

Commit 0f42c9c

Browse files
committed
fixed broken test
1 parent b8a7190 commit 0f42c9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rubberduck.Parsing/Symbols/BoundExpressionVisitor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ private void Visit(
4848
bool isAssignmentTarget,
4949
bool hasExplicitLetStatement)
5050
{
51-
if (isAssignmentTarget && expression.Context.Parent is VBAParser.IndexExprContext)
51+
if (isAssignmentTarget && expression.Context.Parent is VBAParser.IndexExprContext && !expression.ReferencedDeclaration.IsArray)
5252
{
5353
// 'SomeDictionary' is not the assignment target in 'SomeDictionary("key") = 42'
54+
// ..but we want to treat array index assignment as assignment to the array itself.
5455
isAssignmentTarget = false;
5556
}
5657

0 commit comments

Comments
 (0)