vapourlang / vapour

Typed superset of R
http://vapour.run
Apache License 2.0
162 stars 2 forks source link

incrementing/decrement on const #72

Open ElianHugh opened 3 hours ago

ElianHugh commented 3 hours ago

The following works as expected, and vapour flags it as an error

const x: int = 1
x = x + 1 # `x` is a constant

However, the following compiles fine (when it shouldn't)

const x: int = 1
x += 1
JohnCoene commented 3 hours ago

Indeed, that's most definitely a bug, thank you for reporting it!