Skip to content

Commit

Permalink
Bugfix for #181 #179
Browse files Browse the repository at this point in the history
Fixed Invalid Cast exception when using index on Text
  • Loading branch information
StefanMaron committed Mar 20, 2022
1 parent e1414de commit 3cfd5ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Design/Rule0017WriteToFlowField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private void CheckForWriteToFlowField(OperationAnalysisContext context)
else
{
IAssignmentStatement operation = (IAssignmentStatement)context.Operation;
if (operation.Target.Kind == OperationKind.FieldAccess)
if (operation.Target.Kind == OperationKind.FieldAccess && ((ITextIndexAccess)operation.Target).TextExpression.Kind == OperationKind.FieldAccess)
{
try
{
Expand Down

0 comments on commit 3cfd5ec

Please sign in to comment.