-
-
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
function definitions inside try / catch block behave differently in 0.5 - intended? #18767
Comments
It looks like this was a bug in 0.4, since
so other blocks that introduce scopes behaved this way before, but not |
Use |
Try blocks behave differently in julia v0.5 compared to v0.4. The new behaviour caused the show methods requiring Cairo to be defined in local scope instead of global scope, which in turn prevented them from being used. See also: JuliaLang/julia#18767
Thanks for the clarification! :-)
|
This should work on both: try
global foo
function foo(...) ... end |
works, thanks! :-) |
Sounds like this was resolved? Feel free to reopen if not, @tauu :). |
The following code behaves differently in julia v0.4 and julia v0.5
In Julia v0.4 it returns
whereas in Julia v0.5 I get
So in Julia v0.5 the method is not defined in global scope. This is even the case if a function in global scope exists. For Example:
will actually not create a new method for the function Base.show, but a new local function show with one method.
Is this change intended? I couldn't find anything about it in the release notes.
The text was updated successfully, but these errors were encountered: