mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
fix: ownership bug
This commit is contained in:
parent
c76de00847
commit
36fcc8cb79
5 changed files with 46 additions and 15 deletions
|
@ -2212,6 +2212,13 @@ impl Signature {
|
|||
Self::Subr(s) => Some(&mut s.params),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn captured_names(&self) -> &[Identifier] {
|
||||
match self {
|
||||
Self::Var(_) => &[],
|
||||
Self::Subr(s) => &s.captured_names,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue