-
Notifications
You must be signed in to change notification settings - Fork 240
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
Default argument expressions should inherit throwability from calling context #1400
Comments
Default argument expressions that throw are supported, but the function ( |
Ah, good point! But yeah, we're not throwing inside |
Another thought is that it would be nice if |
Trouble there is that arrays have reference semantics, so after passing an empty array ("by value") to a function that pushes something into it, the caller and the callee would see different array backing stores. |
We currently refuse to compile this:
We should allow it, since any error thrown would be thrown in the
main
context, which is throwsy :)The text was updated successfully, but these errors were encountered: