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

Support Vararg in @non_differentiable macro #254

Merged
merged 11 commits into from
Dec 1, 2020
Merged

Support Vararg in @non_differentiable macro #254

merged 11 commits into from
Dec 1, 2020

Conversation

mzgubic
Copy link
Member

@mzgubic mzgubic commented Nov 26, 2020

Closes #212 .

@mzgubic mzgubic changed the title WIP: Support Vararg in @non_differentiable macro Support Vararg in @non_differentiable macro Nov 27, 2020
@gxyd
Copy link
Contributor

gxyd commented Nov 28, 2020

On top of your branch. When I do something like:

julia> @non_differentiable vcat(::Any, ::Vararg{AbstractArray{Int}})

it works just fine. But doing:

julia> @non_differentiable vcat(::Any, ::AbstractArray{Int}...)
syntax: "::AbstractArray{Int}" is not a valid function argument name

Stacktrace:
 [1] top-level scope at /Users/gaurav/.julia/packages/IJulia/a1SNk/src/kernel.jl:53

Is the second an incorrect Julia syntax?

@mzgubic
Copy link
Member Author

mzgubic commented Nov 30, 2020

Thanks for taking a look so quickly and catching this bug. What you showed is correct Julia syntax and should have been added.

Copy link
Member

@oxinabox oxinabox left a comment

Choose a reason for hiding this comment

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

This is great.
Some comments that you should adress before merging, but I don't think this will need further review

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.

support varargs in @non_differentiable
3 participants