Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CancellationTokenAnalyzer fluent style API bug #6751

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

danielmarbach
Copy link
Contributor

@danielmarbach danielmarbach commented Jun 5, 2023

A fix for analyzer bug #6753

@danielmarbach danielmarbach changed the title Reproduction test analyzer cancellation token propagation for fluent style methods Fix CancellationTokenAnalyzer fluent style API bug Jun 5, 2023
@danielmarbach danielmarbach marked this pull request as ready for review June 5, 2023 09:01
var startToken = root.FindToken(diagnostic.Location.SourceSpan.Start);
var invocationSyntax = startToken.Parent.AncestorsAndSelf().OfType<InvocationExpressionSyntax>().First();
var startToken = root.FindNode(diagnostic.Location.SourceSpan);
var invocationSyntax = (InvocationExpressionSyntax)startToken;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the previous implementation always assumed there is an InvocationExpressionSyntax found, I left this assumption intact by doing a cast.

@DavidBoike DavidBoike merged commit dbfcbd5 into master Jun 5, 2023
@DavidBoike DavidBoike deleted the analyzer-fluent branch June 5, 2023 16:20
@DavidBoike DavidBoike added this to the 8.1.0 milestone Jun 5, 2023
@andreasohlund andreasohlund removed this from the 8.1.0 milestone Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants