Skip to content

Do not do analysis for invalid argument escape mixing when having binding errors.#24656

Merged
VSadov merged 1 commit intodotnet:dev15.7.xfrom
VSadov:fix24627
Feb 6, 2018
Merged

Do not do analysis for invalid argument escape mixing when having binding errors.#24656
VSadov merged 1 commit intodotnet:dev15.7.xfrom
VSadov:fix24627

Conversation

@VSadov
Copy link
Copy Markdown
Member

@VSadov VSadov commented Feb 6, 2018

Fixes:#24627

Customer scenario

Customer types code that involves calling methods on a ref-like type and makes a mistake calling an instance method as if it is a static method.

This should just produce a compile error. Instead compiler crashes.

Bugs this fixes

#24627

Workarounds, if any

Not type this kind of code.

Risk

Low. We just check if we already in an error state before continuing with analysis.

Performance impact

Low perf impact because no extra allocations/no complexity changes

Is this a regression from a previous update?

No

Root cause analysis

Escape analysis checks the node for errors before doing analysis. In this scenario the analysis happens when outer node is not created yet, so it is slightly different and was missed.

Added tests.

How was the bug found?

customer reported

Test documentation updated?

N/A

@VSadov VSadov requested a review from a team as a code owner February 6, 2018 01:36
@VSadov
Copy link
Copy Markdown
Member Author

VSadov commented Feb 6, 2018

@dotnet/roslyn-compiler - please review

@VSadov
Copy link
Copy Markdown
Member Author

VSadov commented Feb 6, 2018

@dotnet/roslyn-compiler - PING. Simple fix for a crash. (targeting 15.7.x)

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 (iteration 1)

@VSadov
Copy link
Copy Markdown
Member Author

VSadov commented Feb 6, 2018

CC:@jaredpar - for the ask mode approval.

@jaredpar
Copy link
Copy Markdown
Member

jaredpar commented Feb 6, 2018

approved

@VSadov
Copy link
Copy Markdown
Member Author

VSadov commented Feb 6, 2018

Thanks!!

@VSadov VSadov merged commit 0e01a3d into dotnet:dev15.7.x Feb 6, 2018
@VSadov VSadov deleted the fix24627 branch February 6, 2018 22:48
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.

4 participants