use of abstract element types not recommended
Closed this issue · 2 comments
KlausC commented
See julia docu
instead of
struct Mod
val::Integer
mod::Integer
end
you should use
struct Mod{T<:Integer}
val::T
mod::T
end
or even
struct Mod{T<:Unsigned} <:Real
...
end
The constructors should derive the concrete types from their arguments.
scheinerman commented
OK. I think I understand the issue and will try an update.
scheinerman commented
Update posted.