Skip to content

Avoid cascading diagnostics on error base type#62087

Merged
jcouv merged 3 commits intodotnet:mainfrom
jcouv:base-error
Jun 28, 2022
Merged

Avoid cascading diagnostics on error base type#62087
jcouv merged 3 commits intodotnet:mainfrom
jcouv:base-error

Conversation

@jcouv
Copy link
Copy Markdown
Member

@jcouv jcouv commented Jun 22, 2022

Fixes #62051

@jcouv jcouv self-assigned this Jun 22, 2022
@ghost ghost added the Area-Compilers label Jun 22, 2022
@jcouv jcouv force-pushed the base-error branch 2 times, most recently from 1228cd5 to d9bc65f Compare June 23, 2022 00:13
@jcouv jcouv marked this pull request as ready for review June 24, 2022 16:34
@jcouv jcouv requested review from a team as code owners June 24, 2022 16:34
BindingDiagnosticBag diagnostics,
CancellationToken cancellationToken)
{
if (this.BaseTypeNoUseSiteDiagnostics?.IsErrorType() == true)
Copy link
Copy Markdown
Contributor

@AlekseyTs AlekseyTs Jun 24, 2022

Choose a reason for hiding this comment

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

if (this.BaseTypeNoUseSiteDiagnostics?.IsErrorType() == true)

Consider adding a comment explaining that the motivation here is to suppress diagnostics, it is safe to execute the code below under this condition.

Copy link
Copy Markdown
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 2)

@jcouv
Copy link
Copy Markdown
Member Author

jcouv commented Jun 25, 2022

@dotnet/roslyn-compiler for second review. Thanks

@333fred
Copy link
Copy Markdown
Member

333fred commented Jun 25, 2022

@jcouv you have 2 compiler reviews 😉

@jcouv jcouv enabled auto-merge (squash) June 27, 2022 17:00
@jcouv jcouv merged commit f40afb1 into dotnet:main Jun 28, 2022
@ghost ghost added this to the Next milestone Jun 28, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.3 P3 Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incomplete record inheritance syntax produces a lot of nonsense compiler errors

5 participants