Remove constructor of Int from ArfLike
and add from ArfOrRef
#160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ArfLike
includesPtr{Arblib.arf_struct}
and for pointers there is already a conversion to Int defined in base Julia which we should probably not override.I noticed this issue because I was looking for method invalidations using
SnoopCompile
. More precisely I ranwhich gave as output
I noticed that we invalidated
Int64(x::Ptr)
, which seemed problematic. I don't think any of the other invalidations are problematic, though I don't fully understand the second one.It could maybe be reasonable to also remove the constructors for
Float64(::Ptr{ArbExtras.mag_struct})
,Float64(::Ptr{Arblib.arf_struct})
andFloat64(::Ptr{Arblib.arb_struct})
as well asComplexF64(::Ptr{Arblib.acb_struct})
. Though I don't think they would be problematic in any way so I'm fine with keeping them as well.