Skip to content

Commit 9f24102

Browse files
committed
fix: minor typos
1 parent 10b078d commit 9f24102

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: src/main/scala/esmeta/util/domain/BSet.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ enum BSet[+T] {
2626

2727
def isTop: Boolean = this == Inf
2828
def isBottom: Boolean = this == Fin(Set())
29-
inline def (that: BSet[T @uncheckedVariance]): Boolean = this that
29+
inline def (that: BSet[T @uncheckedVariance]): Boolean = this <= that
3030
def <=[U >: T](that: BSet[U]): Boolean = (this, that) match
3131
case (_, Inf) => true
3232
case (Inf, _) => false
3333
case (Fin(lset), Fin(rset)) => lset.toSet subsetOf rset.toSet
34-
inline def (that: BSet[T @uncheckedVariance]): BSet[T] = this that
34+
inline def (that: BSet[T @uncheckedVariance]): BSet[T] = this || that
3535
def ||[U >: T](that: BSet[U]): BSet[U] = (this, that) match
3636
case (Inf, _) | (_, Inf) => Inf
3737
case (Fin(lset), Fin(rset)) => Fin(lset ++ rset)
38-
inline def (that: BSet[T @uncheckedVariance]): BSet[T] = this that
38+
inline def (that: BSet[T @uncheckedVariance]): BSet[T] = this && that
3939
def &&[U >: T](that: BSet[U]): BSet[U] = (this, that) match
4040
case (Inf, _) => that
4141
case (_, Inf) => this
@@ -52,6 +52,6 @@ enum BSet[+T] {
5252
object BSet {
5353
val Top = Inf
5454
val Bot = BSet()
55-
inline def apply[A](elems: A*): BSet[A] = apply(elems)
56-
inline def apply[A](elems: Iterable[A]): BSet[A] = Fin(elems.toSet)
55+
inline def apply[T](elems: T*): BSet[T] = apply(elems)
56+
inline def apply[T](elems: Iterable[T]): BSet[T] = Fin(elems.toSet)
5757
}

Diff for: src/main/scala/esmeta/util/domain/Flat.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum Flat[+T] {
2525

2626
def isTop: Boolean = this == Many
2727
def isBottom: Boolean = this == Zero
28-
inline def (that: Flat[T @uncheckedVariance]): Boolean = this that
28+
inline def (that: Flat[T @uncheckedVariance]): Boolean = this <= that
2929
def <=[U >: T](that: Flat[U]): Boolean = (this, that) match
3030
case (Zero, _) | (_, Many) => true
3131
case (Many, _) | (_, Zero) => false
@@ -55,8 +55,8 @@ enum Flat[+T] {
5555
object Flat {
5656
val Top = Many
5757
val Bot = Zero
58-
inline def apply[A](elems: A*): Flat[A] = apply(elems)
59-
def apply[A](elems: Iterable[A]): Flat[A] =
58+
inline def apply[T](elems: T*): Flat[T] = apply(elems)
59+
def apply[T](elems: Iterable[T]): Flat[T] =
6060
if (elems.isEmpty) Zero
6161
else if (elems.size == 1) One(elems.head)
6262
else Many

0 commit comments

Comments
 (0)