# Is this a bug (scalar+ranges) with the parser?

**URL:** <https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670>\
**Category:** Internals & Design\
**Tags:** broadcasting, range\
**Created:** [October 30, 2021, 7:45pm UTC](https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670 "2021-10-30T19:45:44Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 30, 2021, 11:48pm UTC](https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670/5 "2021-10-30T23:48:17Z")

</div>

> [@gustaphe](#):
>
> `1:5 .+ 0.5` is such a dangerous pattern

Linking [this related post](https://discourse.julialang.org/t/unitrange-in-1-7-rc1-bug/68327), where one danger is illustrated by:

```julia
v = (1:5) .- 1/7
length(v) == 4 # true  

v = collect(1:5) .- 1/7
length(v) == 5 # true  

```

_ **NB:** using Julia 1.7_

---

_[View the full topic](https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670)._
