mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
fix: dict iterators bug
This commit is contained in:
parent
da9b6befdc
commit
7729b73809
11 changed files with 160 additions and 52 deletions
|
@ -1028,6 +1028,18 @@ impl<T: Locational, const N: usize> Locational for [T; N] {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Locational> Locational for Vec<T> {
|
||||
fn loc(&self) -> Location {
|
||||
Location::stream(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Locational> Locational for &T {
|
||||
fn loc(&self) -> Location {
|
||||
(*self).loc()
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! impl_locational_for_enum {
|
||||
($Enum: ident; $($Variant: ident $(,)?)*) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue