Fix an Erg standard library loading bug

This commit is contained in:
Shunsuke Shibayama 2022-12-09 11:48:13 +09:00
parent a460b431a3
commit a395938413
7 changed files with 68 additions and 47 deletions

View file

@ -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