-
Notifications
You must be signed in to change notification settings - Fork 90
v7.x Q re throw expressions #66
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
Comments
The interaction of #65 and #213 does not allow a throw expression as an operand of a ref conditional expression: ref int F(bool b, ref int i) => ref b ? ref i : ref throw null; because "Both expressions shall be variables having the same type" and "A throw_expression has no type." I suppose this restriction is by design. |
See PR #65 Note that instead of "primary", the throw expression precedence should be the same as the null coalescing question. |
@KalleOlaviNiemitalo: It's not clear to me from your comment whether this is how the compiler actually behaves, or whether this is an area you think this needs a spec change. I want to close this issue when #65 is merged, so please could you file a new issue if you believe we need to do more work on this? |
@jskeet the standard text matches compiler behaviour and I think the behaviour is reasonable so no action is required. |
Yes, I think so. |
In Draft PR #65, I've added almost all the edits to support the addition of throw expressions. Here's what's missing:
The text was updated successfully, but these errors were encountered: