diff --git a/analyzer/psi/Signature.v b/analyzer/psi/Signature.v index 58f55b58..70ba2b01 100644 --- a/analyzer/psi/Signature.v +++ b/analyzer/psi/Signature.v @@ -12,10 +12,12 @@ pub fn (s &Signature) get_type() types.Type { pub fn (n Signature) parameters() []PsiElement { mut parameters := []PsiElement{} - list := n.find_child_by_type_or_stub(.parameter_list) or { return parameters } - parameters << list.find_children_by_type_or_stub(.parameter_declaration) - list_type := n.find_child_by_type_or_stub(.type_parameter_list) or { return parameters } - parameters << list_type.find_children_by_type_or_stub(.type_parameter_declaration) + if list := n.find_child_by_type_or_stub(.parameter_list) { + parameters << list.find_children_by_type_or_stub(.parameter_declaration) + } + if list_type := n.find_child_by_type_or_stub(.type_parameter_list) { + parameters << list_type.find_children_by_type_or_stub(.type_parameter_declaration) + } return parameters }