-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Refine syntax error recovery for partial code to not interfere with non-error code. #17692
Conversation
…on-error code. Related to dotnet#15885 Fixes dotnet#17683
test windows_debug_vs-integration_prtest please |
@dotnet/roslyn-compiler @jaredpar @CyrusNajmabadi Please review this tiny correction to a recent change to error recovery. It addresses VSO 393733 |
t == Int32. | ||
MinValue | ||
select t"; | ||
UsingExpression(source); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UsingExpression(source); [](start = 12, length = 24)
Is there a way to assert that there is no errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the helper is taking expected diagnostics as an optional parameter. So the errors are checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the helper doesn't really help the reader know that, though. I'll look at improving that in the future.
MaxValue when true: | ||
break; | ||
}"; | ||
UsingStatement(source); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UsingStatement(source); [](start = 12, length = 23)
Is there a way to assert that there is no errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the helper is taking expected diagnostics as an optional parameter. So the errors are checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@dotnet/roslyn-compiler May I please have a second review? |
2 similar comments
@dotnet/roslyn-compiler May I please have a second review? |
@dotnet/roslyn-compiler May I please have a second review? |
LGTM |
👍 |
Related to #15885
Fixes #17683
@CyrusNajmabadi Would you like to have a look at this before I send it out for review?