Skip to content

Commit

Permalink
Fix 2.13 compile
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Nov 29, 2021
1 parent d154514 commit 10f00ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala-2/spire/macros/Auto.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ abstract class AutoAlgebra extends AutoOps { ops =>
// default implementations from EuclideanRing
@tailrec final def euclid(a: A, b: A)(implicit ev: Eq[A]): A =
if (isZero(b)) a else euclid(b, emod(a, b))
def gcd(a: A, b: A)(implicit ev: Eq[A]): A =
override def gcd(a: A, b: A)(implicit ev: Eq[A]): A =
euclid(a, b)(ev)
def lcm(a: A, b: A)(implicit ev: Eq[A]): A =
override def lcm(a: A, b: A)(implicit ev: Eq[A]): A =
if (isZero(a) || isZero(b)) zero else times(equot(a, gcd(a, b)), b)

def zero: A = z.splice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class FpFilterSuite extends munit.ScalaCheckSuite {
// the exact case, since it'll fail with an Evaluated excetion.
sealed trait Bad
implicit object BadField extends Field[Bad] with IsReal[Bad] with NRoot[Bad] {
def order = this
def additiveCommutativeMonoid = this
def zero: Bad = evaluated
def one: Bad = evaluated
def negate(a: Bad): Bad = evaluated
Expand Down

0 comments on commit 10f00ed

Please sign in to comment.