[BUG]fix gh-2348

when constant are used, we use the smallest dtype for them. But this
isn't enought when computing on them. So upcast to int64 to make sure
compuration is right.
Why is this an `elif` rather than an `if`? should we not cast `start` even if `stop` was casted?