Why not use
foo{I<:Integer}(u::UnitRange{I}) = 1
On Sunday, November 22, 2015 at 7:38:29 AM UTC-5, andrew cooke wrote:
>
>
> Out of my depth here - no idea if this is a bug or me...
>
> julia> foo{I<:Integer,U<:UnitRange{I}}(u::U) = 1
> ERROR: TypeError: UnitRange: in T, expected T<:Real, got UniformScaling{
> Int64}
>
> Version 0.4.1-pre+22 (2015-11-01 00:06 UTC)
>
> Thanks, Andrew
>
