You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
Currently, accessing fields from optionals that are none silently crash the program. I would have expected the compiler to give an error when dereferencing an optional.
Commit: f2107d4 (current main branch commit)
When running this program
struct Node {
data: i64
next: Node?
}
mut list = new Node(data: 1, next: new Node(data: 2, next: none))
println(list.next.data)
mut list2 = new Node(data: 0, next: none)
println(c"ALIVE")
println(list2.next.data)
println(c"DEAD")
it outputs
2
ALIVE
P.S.: I am aware that this project is in its early days, so if this issue is known or not relevant to the current state of this project, feel free to close it. I am curious to see how this project will evolve :)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, accessing fields from optionals that are none silently crash the program. I would have expected the compiler to give an error when dereferencing an optional.
Commit: f2107d4 (current main branch commit)
When running this program
it outputs
P.S.: I am aware that this project is in its early days, so if this issue is known or not relevant to the current state of this project, feel free to close it. I am curious to see how this project will evolve :)
The text was updated successfully, but these errors were encountered: