From 84b1b03fe3788ecd61ed74a4400f743b45e753d5 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 25 Mar 2014 10:32:45 -0400 Subject: [PATCH] Fix #6262 Use an Int for the accumulation variable when iterating over integer types smaller than Int, and the type of the range when iterating over types larger than Int --- base/range.jl | 14 +++++++------- test/ranges.jl | 32 +++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/base/range.jl b/base/range.jl index 3ff19c370ba4c..08394a9180493 100644 --- a/base/range.jl +++ b/base/range.jl @@ -53,18 +53,15 @@ colon{T<:Integer}(start::T, stop::T) = Range1{T}(start, ifelse(stop