mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
chore: fix type variance bug
This commit is contained in:
parent
ccb54e0115
commit
6b5af0ffb4
3 changed files with 56 additions and 2 deletions
|
@ -286,6 +286,12 @@ impl std::ops::Mul for Variance {
|
|||
}
|
||||
}
|
||||
|
||||
impl Variance {
|
||||
pub const fn is_invariant(&self) -> bool {
|
||||
matches!(self, Variance::Invariant)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct ParamSpec {
|
||||
pub(crate) name: Option<Str>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue