Skip to content

Commit 38caf4b

Browse files
non_diff typejoin and Base.depwarn (#398)
* non_diff typejoin * bump patch * add test * fix tests * typos * non_diff depwarn * tests for non_diff depwarn * fix tests
1 parent fdeaccb commit 38caf4b

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRules"
22
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "0.7.59"
3+
version = "0.7.60"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/rulesets/Base/nondiff.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,13 @@ VERSION >= v"1.1" && @non_differentiable splitpath(::AbstractString)
400400
@non_differentiable write(::IO, ::Any...)
401401

402402
@non_differentiable xor(::Any...)
403+
@non_differentiable typejoin(::Any...)
403404

404405
# Non-public Base
405406
@non_differentiable Base.gc_num()
406407
@non_differentiable Base.time_ns()
407408
@non_differentiable Base.typename(::Any)
409+
@non_differentiable Base.depwarn(::Any...)
408410

409411
@non_differentiable Broadcast.combine_styles(::Any...)
410412
@non_differentiable Broadcast.result_style(::Any)

test/rulesets/Base/base.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,14 @@
163163
test_scalar(ceil, x; fdm=forward_fdm(5, 1))
164164
end
165165
end
166+
167+
@testset "type" begin
168+
@test frule((NO_FIELDS, DoesNotExist(), DoesNotExist()), typejoin, Array{Float32,4}, Array{Float32,3}) !== nothing
169+
@test rrule(typejoin, Array{Float32,4}, Array{Float32,3}) !== nothing
170+
end
171+
172+
@testset "Logging" begin
173+
@test frule((NO_FIELDS, DoesNotExist(), DoesNotExist()), Base.depwarn, "message", :f) !== nothing
174+
@test rrule(Base.depwarn, "message", :f) !== nothing
175+
end
166176
end

0 commit comments

Comments
 (0)