-
-
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
produce only one Expr type from A <: B expressions #9503
Comments
Yes, I definitely agree. Since |
Was it done this way to make it easier to apply |
Should fix #9503 This is a backwards incompatible change, note that before ```julia type A <: B end ``` would be parsed as: ```julia Expr(:type, true, Expr(:(<:), :A, :B), Expr(:block,)) ``` now it is parsed as ```julia Expr(:type, true, Expr(:comparison, :A, :(<:), :B), Expr(:block,)) ``` chained subtype comparisons for type/immutable are still disallowed ```julia type A <: B <: C end ```
Started working on fixing this, which in the process revealed what I think was the cause. The So we could go with SGJ's suggestion of always parsing it as |
fix #9503 plus another proposal on comparison and iteration syntax
As discussed in #9474, the parsing of
A <: B
is currently somewhat inconsistent, and this makes metaprogamming a bit harder than necessary:Perhaps
A <: B
should be parsed asExpr(:(<:), :A, :B)
in all cases. cc: @yuyichaoThe text was updated successfully, but these errors were encountered: