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

fix some macro expander issues with new 0.6 syntax #22166

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

JeffBezanson
Copy link
Member

@JeffBezanson JeffBezanson commented May 31, 2017

fixes #22135, fixes #22122, fixes #22026, fixes #21581
Now also #16096

@JeffBezanson JeffBezanson added backport pending 0.6 bugfix This change fixes an existing bug compiler:lowering Syntax lowering (compiler front end, 2nd stage) labels May 31, 2017
@JeffBezanson JeffBezanson force-pushed the jb/macrofixes branch 2 times, most recently from 6bf8906 to d54e2bc Compare June 1, 2017 02:38
@fredrikekre
Copy link
Member

This also fixes #19351🎉

@tkelman
Copy link
Contributor

tkelman commented Jun 1, 2017

The various helper functions sure could use comments describing what they're doing.

This also fixes #19351🎉

would be good to add a test for that as well then, if not exactly covered

@JeffBezanson
Copy link
Member Author

Done and done.

macro generated(f)
isa(f, Expr) || error("invalid syntax; @generated must be used with a function definition")
if f.head === :function || (isdefined(:length) && f.head === :(=) && length(f.args) == 2 && f.args[1].head == :call)
if f.head === :function || (isdefined(:length) && f.head === :(=) && length(f.args) == 2 &&
eventually_call(f.args[1]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use existing is_short_function_def instead

@JeffBezanson JeffBezanson merged commit ce1e3a5 into master Jun 1, 2017
@JeffBezanson JeffBezanson deleted the jb/macrofixes branch June 1, 2017 18:47
tkelman pushed a commit that referenced this pull request Jun 3, 2017
fixes #22135, fixes #22122, fixes #22026, fixes #21581, fixes #16096, fixes #19351

(cherry picked from commit 60675d2)
ref #22166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:lowering Syntax lowering (compiler front end, 2nd stage)
Projects
None yet
4 participants