We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
p := unsafe{ &m[key] or { nil } }
1 parent b59b787 commit b59a83fCopy full SHA for b59a83f
vlib/v/ast/scope.v
@@ -65,8 +65,9 @@ pub fn (s &Scope) find_ptr(name string) &ScopeObject {
65
return 0
66
}
67
for sc := unsafe { s }; true; sc = sc.parent {
68
- if name in sc.objects {
69
- return unsafe { &sc.objects[name] }
+ pobj := unsafe { &sc.objects[name] or { nil } }
+ if pobj != unsafe { nil } {
70
+ return pobj
71
72
if sc.dont_lookup_parent() {
73
break
0 commit comments