Skip to content

Commit

Permalink
Resolve InvalidCastException
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurvdv committed Jan 30, 2024
1 parent 86d6a5f commit 12a1c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Design/Rule0039ArgumentDifferentTypeThenExpected.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void AnalyzeSetRecordArgument(OperationAnalysisContext ctx)
.Where(x => x.Type.GetNavTypeKindSafe() == NavTypeKind.Page)
.SingleOrDefault();
if (pageReference == null) return;
IVariableSymbol variableSymbol = (IVariableSymbol)pageReference.GetSymbol().OriginalDefinition;
ISymbol variableSymbol = pageReference.GetSymbol().OriginalDefinition;
IPageTypeSymbol pageTypeSymbol = (IPageTypeSymbol)variableSymbol.GetTypeSymbol().OriginalDefinition;
if (pageTypeSymbol.RelatedTable == null)
{
Expand Down

0 comments on commit 12a1c69

Please sign in to comment.