-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
eval'd expressions inside begin..end should be top-level when possible #2586
Comments
You can put |
That works, thanks. |
It seems the issue is a bit more fundamental:
I changed the title. I couldn't find any open issues for this. |
@JeffBezanson, can you clarify if this is a bug or a "feature"? I'll close the issue if it's the latter. |
It's neither a bug nor a feature; it's just that there are no "local types". Types have to be defined at the top level. In the original issue, there are no explicit scopes introduced around the type definition, so it's reasonable to expect that it's at the top level. |
Got it. The error message for attempting to define types inside functions could also be improved. |
Original example works and error message now is
|
You can still reproduce this if the top-level block contains a |
Should we reopen then? |
Looks like a bug in
eval
:The text was updated successfully, but these errors were encountered: