Skip to content

Commit be4eeb5

Browse files
authored
What if lifted_getfeild on a tangent just called getproperty (#39)
1 parent 8f2199d commit be4eeb5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/stage1/generated.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,7 @@ end
389389
lifted_getfield(x::ZeroTangent, s) = ZeroTangent()
390390
lifted_getfield(x::NoTangent, s) = NoTangent()
391391

392-
function lifted_getfield(x::Tangent, s)
393-
z = getfield(ChainRulesCore.backing(ChainRulesCore.canonicalize(x)), s)
394-
z
395-
end
392+
lifted_getfield(x::Tangent, s) = getproperty(x, s)
396393

397394
function lifted_getfield(x::Tangent{<:Tangent{T}}, s) where T
398395
bb = getfield(x.backing, 1)

0 commit comments

Comments
 (0)