Skip to content

Commit

Permalink
Merge pull request #476 from StefanMaron/development
Browse files Browse the repository at this point in the history
Resolve System.InvalidCastException on LC0044
  • Loading branch information
Arthurvdv authored Jan 3, 2024
2 parents 52b7e7d + 4db3a57 commit c19bc74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Design/Rule0044AnalyzeTransferField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ private bool DifferentNameAndTypeFilter(IGrouping<int, Field> fieldGroup)

private string? GetObjectName(VariableDeclarationBaseSyntax variable)
{
if (variable == null)
if (variable == null || variable.Type.DataType.GetType() == typeof(SimpleNamedDataTypeSyntax))
return null;

SubtypedDataTypeSyntax subtypedData = (SubtypedDataTypeSyntax)variable.Type.DataType;
Expand Down

0 comments on commit c19bc74

Please sign in to comment.