Skip to content

Commit 454e6b2

Browse files
ocotsclaude
andcommitted
test(differentiation): guard bare parameter(DifferentiationInterface)==nothing
Regression guard for the same class of issue fixed in CTSolvers SciML: a consumer registering DI without a device parameter (e.g. CTFlows' flow registry) queries parameter on the bare type. DI is already backward-compatible here via the AbstractADBackend family default (nothing); this pins that behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 1179bcd commit 454e6b2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/suite/differentiation/test_di_parameter.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ function test_di_parameter()
2121
# ====================================================================
2222

2323
Test.@testset "parameter contract" begin
24+
# Bare (device-unspecified) DI resolves to `nothing` via the AbstractADBackend
25+
# family default — required by consumers that register DI without a parameter
26+
# (e.g. CTFlows' flow registry) and query `parameter` on the bare type.
27+
Test.@test Strategies.parameter(DI) === nothing
28+
2429
Test.@test Strategies.parameter(DI{Strategies.CPU}) == Strategies.CPU
2530
Test.@test Strategies.parameter(DI{Strategies.GPU}) == Strategies.GPU
2631
Test.@test Strategies.default_parameter(DI) == Strategies.CPU

0 commit comments

Comments
 (0)