Skip to content

Support Vararg in @non_differentiable macro - #254

Merged
mzgubic merged 11 commits into
masterfrom
mz/vararg
Dec 1, 2020
Merged

mzgubic merged 11 commits into
masterfrom
mz/vararg

Conversation

@mzgubic

@mzgubic mzgubic commented Nov 26, 2020 •

Copy link
Copy Markdown
Member

Closes #212 .

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

gxyd commented Nov 28, 2020

Copy link
Copy Markdown
Contributor

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

mzgubic commented Nov 30, 2020

Copy link
Copy Markdown
Member Author

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

Comment thread src/rule_definition_tools.jl
Comment thread test/rule_definition_tools.jl

@oxinabox oxinabox left a comment

Copy link
Copy Markdown
Member

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