Skip to content

Commit 3004b0c

Browse files
committed
add compat method for getproperty on tuples
1 parent e74b156 commit 3004b0c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/ChainRulesCore.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export extern, store!, unthunk
88
export Composite, DoesNotExist, InplaceableThunk, One, Thunk, Wirtinger, Zero
99
export NO_FIELDS
1010

11+
include("compat.jl")
12+
1113
include("differentials/abstract_differential.jl")
1214
include("differentials/wirtinger.jl")
1315
include("differentials/zero.jl")

src/compat.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if VERSION < v"1.2"
2+
Base.getproperty(x::Tuple, f::Int) = getfield(x, f)
3+
end

0 commit comments

Comments
 (0)