mirror of
https://github.com/vlang/v.git
synced 2025-09-14 09:56:16 -04:00
v.markused: improve stability (avoid runtime crash) when processing generic functions (partial fix for #23927)
This commit is contained in:
parent
62ba811534
commit
8c92e3d0c5
@ -599,6 +599,9 @@ pub fn (mut w Walker) a_struct_info(sname string, info ast.Struct) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut w Walker) fn_decl(mut node ast.FnDecl) {
|
pub fn (mut w Walker) fn_decl(mut node ast.FnDecl) {
|
||||||
|
if node == unsafe { nil } {
|
||||||
|
return
|
||||||
|
}
|
||||||
if node.language == .c {
|
if node.language == .c {
|
||||||
w.mark_fn_as_used(node.fkey())
|
w.mark_fn_as_used(node.fkey())
|
||||||
return
|
return
|
||||||
@ -616,6 +619,9 @@ pub fn (mut w Walker) fn_decl(mut node ast.FnDecl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut w Walker) call_expr(mut node ast.CallExpr) {
|
pub fn (mut w Walker) call_expr(mut node ast.CallExpr) {
|
||||||
|
if node == unsafe { nil } {
|
||||||
|
return
|
||||||
|
}
|
||||||
for arg in node.args {
|
for arg in node.args {
|
||||||
w.expr(arg.expr)
|
w.expr(arg.expr)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user