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

change :: parsing #18912

Closed
Keno opened this issue Oct 13, 2016 · 0 comments
Closed

change :: parsing #18912

Keno opened this issue Oct 13, 2016 · 0 comments
Assignees
Labels
parser Language parsing and surface syntax
Milestone

Comments

@Keno
Copy link
Member

Keno commented Oct 13, 2016

Currently :: parses as an identifier, allowing e.g.

julia> h(::) = ::
h (generic function with 1 method)

julia> h(1)
1

@JeffBezanson has suggested changing parsing of :: from Symbol("::") to Expr(Symbol("::")), which would give the same error as

julia> ::Any
ERROR: syntax: invalid "::" syntax

The one thing that does make this a little tricky is that packages have been using :(::) for Symbol("::") though arguably those packages should just change to the latter.

@Keno Keno added this to the 0.6.0 milestone Oct 13, 2016
@JeffBezanson JeffBezanson added the parser Language parsing and surface syntax label Oct 14, 2016
@StefanKarpinski StefanKarpinski modified the milestones: 1.0, 0.6.0 Oct 27, 2016
@JeffBezanson JeffBezanson self-assigned this Jul 25, 2017
JeffBezanson added a commit that referenced this issue Jul 25, 2017
fix #18912, `::` should not parse as an identifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

3 participants