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

Misplaced return statement in foundation.jl #7

Merged
merged 2 commits into from
Oct 8, 2015
Merged

Misplaced return statement in foundation.jl #7

merged 2 commits into from
Oct 8, 2015

Conversation

rennis250
Copy link
Contributor

Currently, trying to load this package on Julia v0.3.11 or greater produces the following error:

julia> using ObjectiveC
WARNING: Union(args...) is deprecated, use Union{args...} instead.
 in depwarn at deprecated.jl:73
 in call at deprecated.jl:50
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
while loading /Users/rje/.julia/v0.5/Lazy/src/liblazy.jl, in expression starting on line 93
WARNING: Union(args...) is deprecated, use Union{args...} instead.
 in depwarn at deprecated.jl:73
 in call at deprecated.jl:50
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
while loading /Users/rje/.julia/v0.5/Lazy/src/liblazy.jl, in expression starting on line 100
WARNING: Base.String is deprecated, use AbstractString instead.

WARNING: deprecated syntax "classes (" at /Users/rje/.julia/v0.5/ObjectiveC/src/syntax.jl:42.
Use "classes(" instead.
WARNING: Base.String is deprecated, use AbstractString instead.
WARNING: Base.String is deprecated, use AbstractString instead.

WARNING: deprecated syntax "class (" at /Users/rje/.julia/v0.5/ObjectiveC/src/classes.jl:76.
Use "class(" instead.
WARNING: Base.String is deprecated, use AbstractString instead.
ERROR: LoadError: LoadError: syntax: misplaced return statement
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
while loading /Users/rje/.julia/v0.5/ObjectiveC/src/foundation.jl, in expression starting on line 36
while loading /Users/rje/.julia/v0.5/ObjectiveC/src/ObjectiveC.jl, in expression starting on line 27

Removing the return on line 33 of foundation.jl fixes this and the package then loads. However, I am not sure if this any effect on intended behavior.

Best,
Rob

Robert J. Ennis added 2 commits September 22, 2015 13:07
Currently, trying to load this package on Julia v0.3.11 or greater produces the following error:

```julia
julia> using ObjectiveC
WARNING: Union(args...) is deprecated, use Union{args...} instead.
 in depwarn at deprecated.jl:73
 in call at deprecated.jl:50
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
while loading /Users/rje/.julia/v0.5/Lazy/src/liblazy.jl, in expression starting on line 93
WARNING: Union(args...) is deprecated, use Union{args...} instead.
 in depwarn at deprecated.jl:73
 in call at deprecated.jl:50
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
while loading /Users/rje/.julia/v0.5/Lazy/src/liblazy.jl, in expression starting on line 100
WARNING: Base.String is deprecated, use AbstractString instead.

WARNING: deprecated syntax "classes (" at /Users/rje/.julia/v0.5/ObjectiveC/src/syntax.jl:42.
Use "classes(" instead.
WARNING: Base.String is deprecated, use AbstractString instead.
WARNING: Base.String is deprecated, use AbstractString instead.

WARNING: deprecated syntax "class (" at /Users/rje/.julia/v0.5/ObjectiveC/src/classes.jl:76.
Use "class(" instead.
WARNING: Base.String is deprecated, use AbstractString instead.
ERROR: LoadError: LoadError: syntax: misplaced return statement
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in require at ./loading.jl:243
while loading /Users/rje/.julia/v0.5/ObjectiveC/src/foundation.jl, in expression starting on line 36
while loading /Users/rje/.julia/v0.5/ObjectiveC/src/ObjectiveC.jl, in expression starting on line 27
```

Removing the return on line 33 of foundation.jl fixes this and the package then loads. However, I am not sure if this any effect on intended behavior.

Best,
Rob
This corrects the issues that I was having and that were occuring in issue #5.
@MikeInnes
Copy link
Collaborator

Thanks for the patch

MikeInnes added a commit that referenced this pull request Oct 8, 2015
Misplaced return statement in foundation.jl
@MikeInnes MikeInnes merged commit 746ee5d into JuliaInterop:master Oct 8, 2015
@rennis250
Copy link
Contributor Author

You're welcome. Unfortunately, this doesn't fix everything on version 0.4. Some of Julia's macro processing seems to have changed, which renders @objc unusable it seems, but I haven't kept track of what is new with macros in 0.4. I'll try fiddling again in a day or two.

@rsrock
Copy link

rsrock commented Oct 12, 2015

For the macro processing, see #5. That's as far as I could get with it.

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

Successfully merging this pull request may close these issues.

3 participants