You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Branch master (18 Nov 2020)
Latest commit 823039e by David Wengier:
Create an unsafe method from a local function when necessary (#49389)
Steps to Reproduce:
using System.Runtime.InteropServices;
class C
{
void M()
{
[DllImport("asdf")]
static extern void Local(out int x); // error CS0177
}
[DllImport("asdf")]
static extern void Method(out int x); // no errors
}
Expected Behavior:
No errors
Actual Behavior: error CS0177: The out parameter 'x' must be assigned to before control leaves the current method is reported for Local but not for Method
Note that as the function is extern it isn't allowed to have a body so it's impossible to fix the error
The text was updated successfully, but these errors were encountered:
Version Used:
Steps to Reproduce:
Expected Behavior:
No errors
Actual Behavior:
error CS0177: The out parameter 'x' must be assigned to before control leaves the current method
is reported forLocal
but not forMethod
Note that as the function is extern it isn't allowed to have a body so it's impossible to fix the error
The text was updated successfully, but these errors were encountered: