We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code is possible:
function main() { let foo = [1, 2, 3, 4] mut slice = foo[1..2] slice[0] = 5 println("Foo is {} and the slice is {}", foo, slice) }
This compiles and prints Foo is [1, 5, 3, 4] and the slice is [5]
Foo is [1, 5, 3, 4] and the slice is [5]
I don't know whether this is a design choice that I can't find documentation for, but it really feels like a bug to me.
The text was updated successfully, but these errors were encountered:
It is the same with classes.
class Test { public a: i64 } function main() { let a = Test(a: 1) mut b = a b.a++ println("{}", a) }
With the binding being immutable but not the object itself.
Sorry, something went wrong.
No branches or pull requests
The following code is possible:
This compiles and prints
Foo is [1, 5, 3, 4] and the slice is [5]
I don't know whether this is a design choice that I can't find documentation for, but it really feels like a bug to me.
The text was updated successfully, but these errors were encountered: