-
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
csc.exe crashes with exit code -2146232797 #21811
Comments
I think this is a duplicate of #19033, which is already fixed in master (but the fix is not in VS 15.3). And indeed, your code causes the compiler to throw an exception in the released version, but it works fine on master. |
@agocke to confirm and close. Thanks |
Looks like related to or duplicate of #21543 |
Trying to find my code which is causing -2146232797. So what I'm looking for to get a workaround is something related to local functions and lambdas? I'm positive I'm not putting a local function inside a lambda but the tree of linked issues here seems to cover various issues relating to local functions and lambdas? Too bad there's no "Find local functions" feature. |
Found it! Broken in the current release, fixed in master. class C
{
void M(object parameter)
{
{
var necessary = parameter;
void AlsoNecessary() => LocalFunction();
void LocalFunction() => _ = parameter;
}
}
} So: my workaround is to move the local functions out of the scope they're in to the very end of the enclosing method. 👍 |
Version Used:
Roslyn included in VS 2017 15.3.3
Steps to Reproduce:
Compile the following code:
Expected Behavior:
Since this is valid C# syntax the code should compile
Actual Behavior:
csc.exe crashes with exit code -2146232797
The text was updated successfully, but these errors were encountered: