Skip to content

Commit d32aa01

Browse files
committed
Fixes
1 parent 2bd5843 commit d32aa01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tangent_types/thunks.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disable thunks for 2nd order AD.
22
_usethunks() = true
3-
rrule(::typeof(_usethunks)) = false, (NoTangent(),)
3+
rrule(::typeof(_usethunks)) = false, Returns((NoTangent(),))
44

55
abstract type AbstractThunk <: AbstractTangent end
66

@@ -146,9 +146,9 @@ macro thunk(body)
146146
# so we get useful stack traces if it errors.
147147
func = Expr(:->, Expr(:tuple), Expr(:block, __source__, body))
148148
return quote
149-
$(esc(_usethunks))() ?
149+
_usethunks() ?
150150
Thunk($(esc(func))) :
151-
$(esc(func))()
151+
$(esc(body))
152152
end
153153
end
154154

0 commit comments

Comments
 (0)