Skip to content
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

No error reported for ref type in a declaration expression #64259

Closed
AlekseyTs opened this issue Sep 23, 2022 · 0 comments · Fixed by #64380
Closed

No error reported for ref type in a declaration expression #64259

AlekseyTs opened this issue Sep 23, 2022 · 0 comments · Fixed by #64380

Comments

@AlekseyTs
Copy link
Contributor

class C
{
    static void Main()
    {
        int x = 0, y = 0;
        (ref int a, ref readonly int b) = (x, y);
    }
}

Observed:
No errors, but a and b are not ref variables.

Expected:
Either a parse error, or a binding error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants