mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: voidptr(0) => unsafe { nil } (p.1)
This commit is contained in:
@@ -457,7 +457,7 @@ pub fn (mut c Checker) struct_init(mut node ast.StructInit) ast.Type {
|
||||
if mut field.expr is ast.Ident {
|
||||
if mut field.expr.obj is ast.Var {
|
||||
mut obj := unsafe { &field.expr.obj }
|
||||
if c.fn_scope != voidptr(0) {
|
||||
if c.fn_scope != unsafe { nil } {
|
||||
obj = c.fn_scope.find_var(obj.name) or { obj }
|
||||
}
|
||||
if obj.is_stack_obj && !c.inside_unsafe {
|
||||
|
||||
Reference in New Issue
Block a user