You're right the issue is that Char <: Integer, but segmentation faults still shouldn't happen. I actually see a stack overflow in 0.3.6 (on OS X).
In 0.4, it is simply a MethodError, as Char is no longer a subtype of Integer. -simon On 15 March 2015 at 12:25, Hans W Borchers <[email protected]> wrote: > I thought about writing my own `factorize` function. Testing the "argument > checking" of `factor` I ended with the following events: > > julia> factor(0) > ERROR: number to be factored must be positive > in factor at primes.jl:79 > > julia> factor("0") > ERROR: `factor` has no method matching factor(::ASCIIString) > > what is to be expected, I think, but the following killed my Julia process: > > julia> factor('0') > > signal (11): Segmentation fault > rem at promotion.jl:174 > > Segmentation fault (core dumped) > > I assume this happens because characters are also (almost) integers. > > Anyway, it should under no circumstances kill the whole process. > This is Julia 0.3.6. Does this behaviour still occur under version 0.4? >
