Skip to content

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

4 participants