Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# SparseConnectivityTracer.jl

## Version `v1.1.2`
* ![Bugfix][badge-bugfix] Return `Dual` on `float`, `widen`, `big` ([#279])

## Version `v1.1.1`
* ![Bugfix][badge-bugfix] Fix type conversions of primal value in `Dual` ([#271])

Expand Down Expand Up @@ -151,6 +154,7 @@ This release is only breaking for users who touched unexported internals.
[badge-maintenance]: https://img.shields.io/badge/maintenance-gray.svg
[badge-docs]: https://img.shields.io/badge/docs-orange.svg

[#279]: https://github.com/adrhill/SparseConnectivityTracer.jl/pull/279
[#271]: https://github.com/adrhill/SparseConnectivityTracer.jl/pull/271
[#268]: https://github.com/adrhill/SparseConnectivityTracer.jl/pull/268
[#267]: https://github.com/adrhill/SparseConnectivityTracer.jl/pull/267
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SparseConnectivityTracer"
uuid = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
authors = ["Adrian Hill <gh@adrianhill.de>"]
version = "1.1.1"
version = "1.1.2-DEV"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
2 changes: 1 addition & 1 deletion src/overloads/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end

for f in (:big, :widen, :float)
@eval Base.$f(::Type{T}) where {T <: AbstractTracer} = T
@eval Base.$f(::Type{D}) where {P, T, D <: Dual{P, T}} = $f(P) # only return primal type
@eval Base.$f(::Type{D}) where {P, T, D <: Dual{P, T}} = Dual{$f(P), T}
end

##============================#
Expand Down
2 changes: 1 addition & 1 deletion test/test_constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
function test_type_conversion_functions(::Type{D}, f::Function) where {P, T, D <: Dual{P, T}}
return @testset "Primal type $P_IN" for P_IN in (Int, Float32, Irrational)
P_OUT = f(P_IN)
@test f(Dual{P_IN, T}) == P_OUT # NOTE: this tests Dual{P_IN,T}, not Dual{P,T}
@test f(Dual{P_IN, T}) == Dual{P_OUT, T}
end
end

Expand Down
Loading