mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vast: fix segfault for fn main() { $compile_warn("WARN") }
This commit is contained in:
parent
23da2128d5
commit
cb5d5f8ca5
@ -300,8 +300,11 @@ fn (t Tree) mod(node ast.Module) &Node {
|
|||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (t Tree) scope(scope ast.Scope) &Node {
|
fn (t Tree) scope(scope &ast.Scope) &Node {
|
||||||
mut obj := new_object()
|
mut obj := new_object()
|
||||||
|
if unsafe { scope == nil } {
|
||||||
|
return obj
|
||||||
|
}
|
||||||
obj.add_terse('ast_type', t.string_node('Scope'))
|
obj.add_terse('ast_type', t.string_node('Scope'))
|
||||||
obj.add_terse('parent', t.string_node(ptr_str(scope.parent)))
|
obj.add_terse('parent', t.string_node(ptr_str(scope.parent)))
|
||||||
children_arr := new_array()
|
children_arr := new_array()
|
||||||
|
Loading…
Reference in New Issue
Block a user