hylo icon indicating copy to clipboard operation
hylo copied to clipboard

Local let binding does not prevent mutation

Open tcbrindle opened this issue 5 months ago • 9 comments

The example given in the documentation is

public fun main() {
  let gravity = 9.81
  &gravity = 11.2 // error: cannot assign, `gravity` is a `let` binding
}

However, this code currently compiles without error

tcbrindle avatar Sep 17 '24 23:09 tcbrindle