Skip to content

Conversation

@oxinabox
Copy link
Member

Closes #213

@oxinabox oxinabox added needs tests rule definition helper relating to helpers for declaring rules labels Oct 30, 2020
@oxinabox
Copy link
Member Author

JuliaDiff/ChainRules.jl#310 (comment) reminded me that i should finish this PR

@test pullback(1.2) == (NO_FIELDS, DoesNotExist())

# https://github.com/JuliaDiff/ChainRulesCore.jl/issues/213
# problem was that `@nondiff Foo(x)` was also defining rules for other types.
Copy link
Member

Choose a reason for hiding this comment

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

Wow, that's funky. I guess solves the issue in this comment?
JuliaDiff/ChainRules.jl#310 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep.
Its because typeof(Foo) == DataType and typeof(Bar) == DataType
but Core.Typeof(Foo) == Type{Foo} and Core.Typeof(Bar) == Type{Bar}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs tests rule definition helper relating to helpers for declaring rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support types in @non_differentiable

3 participants