<: is the subtype operator
:: is the isa operator
You can't (currently) express conditions of the form you want (except as
assertions in the constructor)
On Sun, Nov 16, 2014 at 8:03 PM <[email protected]> wrote:
> I've got a parametric type:
>
> immutable SplineInterpolator{N<:Integer} <: Interpolator1D end
>
> NB:
>
> abstract Interpolator
> abstract Interpolator1D <: Interpolator
>
> Now, when I try to create the concrete type...
>
> SplineInterpolator{3}
>
> ...I get the following error message:
>
> ERROR: type: SplineInterpolator: in N, expected N<:Integer, got Int64
>
> NB that typeof(3) <: Integer returns true
>
> Why am I get this error message? Using Julia 0.3.2 on OS X 10.10
>
> Thanks
>