2 ms·
I just downloaded V. The following V code segfaults, much like C would: struct Node { val int left &Node right &Node }
by tayistay 4y ago
I just downloaded V. The following V code segfaults, much like C would:
struct Node {
val int
left &Node
right &Node
}
fn main() {
n := Node { 123, 0, 0 }
m := *n.left
println(m)
}
- amedvednikov 4y agoThat's a bug, the compiler should require `unsafe { n := Node { 123,nil,nil } }`.