Skip to content

Commit 28a5b82

Browse files
committed
Fix printing
1 parent 9e1e3f4 commit 28a5b82

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dense.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ mode(::AutoEnzyme) = ForwardOrReverseMode() # specialized in the extension
7676

7777
function Base.show(io::IO, backend::AutoEnzyme{M, A}) where {M, A}
7878
print(io, AutoEnzyme, "(")
79-
!isnothing(backend.mode) && print(io, "mode=", repr(backend.mode; context = io), ", ")
80-
print(io, "function_annotation=", repr(A; context = io))
79+
!isnothing(backend.mode) && print(io, "mode=", repr(backend.mode; context = io))
80+
!isnothing(backend.mode) && !(A <: Nothing) && print(io, ", ")
81+
!(A <: Nothing) && print(io, "function_annotation=", repr(A; context = io))
8182
print(io, ")")
8283
end
8384

0 commit comments

Comments
 (0)