Skip to content

Commit b9abd85

Browse files
authored
Merge pull request #71 from JuliaDiff/ox/nofieldsiszero
use Zero rather than DoesNotExist for NO_FIELDS
2 parents e5e877b + c3a30b9 commit b9abd85

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/differentials/composite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ Constant for the reverse-mode derivative with respect to a structure that has no
210210
The most notable use for this is for the reverse-mode derivative with respect to the
211211
function itself, when that function is not a closure.
212212
"""
213-
const NO_FIELDS = DoesNotExist()
213+
const NO_FIELDS = Zero()

test/differentials/composite.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,8 @@ end
161161
@test (@allocated ChainRulesCore.elementwise_add(bk, bk)) <= 48
162162
end
163163
end
164+
165+
@testset "NO_FIELDS" begin
166+
@test NO_FIELDS === Zero()
167+
end
164168
end

0 commit comments

Comments
 (0)