Skip to content

Conversation

@timholy
Copy link
Member

@timholy timholy commented Nov 21, 2014

Just queuing this up, but the changes to master have to happen first.

timholy added a commit that referenced this pull request Feb 7, 2015
WIP: Backwards compatibility for Cartesian macros (ngenerate & nsplat)
@timholy timholy merged commit 0b4b92a into master Feb 7, 2015
@timholy timholy deleted the teh/ngenerate branch February 7, 2015 13:19
@simonster
Copy link
Member

This doesn't seem to work for functions that use both @ngenerate and Cartesian macros, e.g.:

julia> @ngenerate N Nothing function f(X::NTuple{N,Any}...)
       @ncall N println X
       end;

julia> f((1, 2))
ERROR: UndefVarError: X_1 not defined
 in anonymous at none:2

@simonster
Copy link
Member

I thought maybe just calling macroexpand from inside the stagedfunction might work, but that gives me an undefined symbol error. It seems like the macro expansion takes place in whatever module is being interpreted and not the module that calls macroexpand.

@simonster
Copy link
Member

#42 seems to fix this.

@timholy
Copy link
Member Author

timholy commented Feb 9, 2015

Thanks, @simonster.

martinholters pushed a commit to martinholters/Compat.jl that referenced this pull request Jul 13, 2016
[WIP] Consolidate functionality under new array function
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.

2 participants