Skip to content

Commit 5c3fdaa

Browse files
committed
fix up for recursive extern
1 parent 5b6c0d8 commit 5c3fdaa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/rules.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ end
132132
fx, f_pushforward = res
133133
df(Δx, Δp) = f_pushforward(NamedTuple(), Δx, Δp)
134134

135-
df_dx = df(One(), Zero())
136-
df_dp = df(Zero(), One())
135+
df_dx::Thunk = df(One(), Zero())
136+
df_dp::Thunk = df(Zero(), One())
137137
@test fx == f(x, p) # Check we still get the normal value, right
138-
@test extern(df_dx) isa expected_type_df_dx
139-
@test extern(df_dp) isa expected_type_df_dp
138+
@test df_dx() isa expected_type_df_dx
139+
@test df_dp() isa expected_type_df_dp
140140

141141

142142
res = rrule(f, x, p)
@@ -145,7 +145,7 @@ end
145145
dself, df_dx, df_dp = f_pullback(One())
146146
@test fx == f(x, p) # Check we still get the normal value, right
147147
@test dself == NO_FIELDS
148-
@test extern(df_dx) isa expected_type_df_dx
149-
@test extern(df_dp) isa expected_type_df_dp
148+
@test df_dx() isa expected_type_df_dx
149+
@test df_dp() isa expected_type_df_dp
150150
end
151151
end

0 commit comments

Comments
 (0)