Skip to content

Fix promotion bug#7727

Merged
rainersigwald merged 3 commits intodotnet:mainfrom
Forgind:fix-promotion-bug
Jun 22, 2022
Merged

Fix promotion bug#7727
rainersigwald merged 3 commits intodotnet:mainfrom
Forgind:fix-promotion-bug

Conversation

@Forgind
Copy link
Copy Markdown
Contributor

@Forgind Forgind commented Jun 21, 2022

Fixes SDK issue

Context

Warnings promoted to errors were not being counted properly

Changes Made

Reverted change that introduced the issue

Testing

Added unit test. Verified that it failed without the change.

Notes


// PERF: Not using VerifyThrow to avoid boxing an int in the non-error case.
if (projectFile == null)
if (!_projectFileMap.TryGetValue(context.ProjectContextId, out string projectFile))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this change required for the insertion-blocking fix?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No; just code cleanliness while I was here. I can revert it.

@rainersigwald rainersigwald added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jun 22, 2022
@rainersigwald rainersigwald added this to the VS 17.3 milestone Jun 22, 2022
@rainersigwald rainersigwald merged commit e504ba9 into dotnet:main Jun 22, 2022
rainersigwald added a commit that referenced this pull request Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants