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 Impala compiler segfaults on the following minmal example:
struct node { value : value_t, left : &node, right : &node } fn post_order_visit(n: &node, visit: fn(value_t) -> ()) -> () { if(n.left != 0 as &node) { post_order_visit(n.left, visit); } if(n.right != 0 as &node) { post_order_visit(n.right, visit); } visit(n.value); } extern fn tree_sum(levels: int) -> value_t { let tree = ~node{value: 0 as value_t, left: 0 as &node, right: 0 as &node }; let mut sum = 0 as value_t; post_order_visit(tree, |x| { sum += x; } ); sum }
This one will also fail:
struct node { value : value_t, left : &node, right : &node } fn make_tree(gen: fn() -> value_t, levels: int) -> &node { if(levels < 1) { return (0 as &node) } ~node { value: gen(), left: make_tree(gen, levels-1), right: make_tree(gen, levels-1) } } extern fn tree_sum(levels: int) -> value_t { let tree = make_tree(||{0 as value_t}, levels); 0 as value_t; }
Note that removing the recursive calls will fix it.
The text was updated successfully, but these errors were encountered:
This is a known problem. Please be patient with this one. Maybe, I'll have a look at this issue over the holidays.
Sorry, something went wrong.
I tested these two examples with the latest version and they compile fine.
leissa
No branches or pull requests
The Impala compiler segfaults on the following minmal example:
This one will also fail:
Note that removing the recursive calls will fix it.
The text was updated successfully, but these errors were encountered: