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

Multiline using in submodule fails #21155

Closed
cstjean opened this issue Mar 24, 2017 · 2 comments
Closed

Multiline using in submodule fails #21155

cstjean opened this issue Mar 24, 2017 · 2 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior parser Language parsing and surface syntax

Comments

@cstjean
Copy link
Contributor

cstjean commented Mar 24, 2017

Since multiline using works in general, it should probably work here too:

julia> module A
       x = 1
       y = 2
       module B
       using ..x, 
             ..y
       end
       end
ERROR: ArgumentError: Module .. not found in current path.
Run `Pkg.add("..")` to install the .. package.
@StefanKarpinski StefanKarpinski added parser Language parsing and surface syntax bug Indicates an unexpected problem or unintended behavior backport pending 0.5 labels Mar 24, 2017
@StefanKarpinski
Copy link
Sponsor Member

Also a bug on 0.5 (and probably earlier, but we're not supporting 0.4 at this point).

@ararslan
Copy link
Member

Two dots:

julia> x = :(
           module B
               using ..x,
                     ..y
           end
       )
:(module B # REPL[1], line 2: # REPL[1], line 3:
    $(Expr(:toplevel, :(using ..x), :(using ..))) * y
    end)

One dot:

julia> module A
       module B
       end
       module C
       end
       using .B,
             .C
ERROR: syntax: invalid identifier name "."

@JeffBezanson JeffBezanson self-assigned this Apr 19, 2017
ararslan added a commit that referenced this issue Apr 19, 2017
fix #21155, parse `using` with leading dots and line breaks
rofinn pushed a commit to invenia/julia that referenced this issue Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

4 participants