mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
chore: trait forward reference
This commit is contained in:
parent
06898bd793
commit
33f6bac20d
3 changed files with 144 additions and 135 deletions
|
@ -34,6 +34,10 @@
|
|||
_ -> panic "invalid semver string: \{s}"
|
||||
@Override
|
||||
__repr__ ref self = "SemVer(\{self.__str__()})"
|
||||
compatible_with self, other =
|
||||
if self.major == 0, do:
|
||||
self.compatible_with::return self == other
|
||||
self.major == other.major
|
||||
#[
|
||||
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]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue