mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 04:44:44 +00:00
Fix an Erg standard library loading bug
This commit is contained in:
parent
a460b431a3
commit
a395938413
7 changed files with 68 additions and 47 deletions
|
@ -8,14 +8,14 @@
|
|||
.Version.
|
||||
new major, minor, patch, pre := None =
|
||||
.Version::__new__ { .major = major; .minor = minor; .patch = patch; .pre = pre }
|
||||
#[
|
||||
#[
|
||||
greater self, other: .Version =
|
||||
match [self.major > other.major, self.major >= other.major, self.minor > other.minor, self.minor >= other.minor, self.patch > other.patch]:
|
||||
[True, _, _, _, _] -> True
|
||||
[_, True, True, _, _] -> True
|
||||
[_, True, _, True, True] -> True
|
||||
_ -> False
|
||||
]#
|
||||
]#
|
||||
.Version|.Version <: Eq|.
|
||||
__eq__ self, other: .Version =
|
||||
self.major == other.major and self.minor == other.minor and self.patch == other.patch and self.pre == other.pre
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue