You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.InvalidCastException : Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ElementAccessExpressionSyntax'.
at FluentAssertions.Analyzers.NodeReplacement.RemoveAndRetrieveIndexerArgumentsNodeReplacement.ComputeNew(LinkedListNode`1 listNode)
at FluentAssertions.Analyzers.FluentAssertionsCodeFixProvider.GetNewExpression(ExpressionSyntax expression,NodeReplacement replacement)
at FluentAssertions.Analyzers.CollectionShouldHaveElementAtCodeFix.GetNewExpression(ExpressionSyntax expression,FluentAssertionsDiagnosticProperties properties)
at async FluentAssertions.Analyzers.FluentAssertionsCodeFixProvider.RewriteAssertion(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputePreviewOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass11_0.<GetPreviewAsync>b__0(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
Expected behavior:
The analyzer should probably not be triggered.
At least I see no semantically equivalent using HaveElementAt()
Actual behavior:
The analyzer was triggered.
Versions
Fluent Assertions Analyzers 0.11.2
.NET framework 4.6.1
The text was updated successfully, but these errors were encountered:
Description
Applying the codefix for
CollectionShouldHaveElementAtCodeFix
gives this stacktrace
Expected behavior:
The analyzer should probably not be triggered.
At least I see no semantically equivalent using
HaveElementAt()
Actual behavior:
The analyzer was triggered.
Versions
The text was updated successfully, but these errors were encountered: