File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -146,14 +146,11 @@ ProjectTo(x::Complex{<:Integer}) = ProjectTo(float(x))
146
146
(:: ProjectTo{T} )(dx:: AbstractFloat ) where T<: AbstractFloat = convert (T, dx)
147
147
(:: ProjectTo{T} )(dx:: Integer ) where T<: AbstractFloat = convert (T, dx) # needed to avoid ambiguity
148
148
149
- # We asked for a number/real and they gave use one. We did ask for a particular concrete
150
- # type, but that is just for the preserving low precision floats, which is handled above.
151
- # Any Number/Real actually occupies the same subspace, so we can trust them.
152
- # In particular, this makes weirder Real subtypes that are not simply the values like
153
- # ForwardDiff.Dual and Symbolics.Sym work, because we stay out of their way.
149
+ # Other numbers, including e.g. ForwardDiff.Dual and Symbolics.Sym, should pass through.
150
+ # We assume (lacking evidence to the contrary) that
151
+ # The (::ProjectTo{T})(::T) method doesn't work because we are allowing a different
152
+ # Number type that might not be a subtype of the `project_type`.
154
153
(:: ProjectTo{<:Number} )(dx:: Number ) = dx
155
- # If you remove the above julia sometimes can't find the (::ProjectTo{T})(::T) for complex T
156
- # Seems like it might be a julia bug?
157
154
158
155
(project:: ProjectTo{<:Real} )(dx:: Complex ) = project (real (dx))
159
156
You can’t perform that action at this time.
0 commit comments