`scala.NotImplementedError: an implementation is missing` at `AsmTestRunner$.matchFingerprints$$anonfun$1`
See original GitHub issueVersion(s)
0.1.9
Describe the bug
scala.NotImplementedError: an implementation is missing
scala.Predef$.$qmark$qmark$qmark(Predef.scala:344)
scala.build.testrunner.AsmTestRunner$.matchFingerprints$$anonfun$1(AsmTestRunner.scala:92)
scala.collection.IterableOnceOps.find(IterableOnce.scala:622)
scala.collection.IterableOnceOps.find$(IterableOnce.scala:618)
scala.collection.AbstractIterable.find(Iterable.scala:926)
scala.build.testrunner.AsmTestRunner$.matchFingerprints(AsmTestRunner.scala:93)
...
To Reproduce
scala-cli test bug.scala
//> using scala "2.13.8"
//> using platform "native"
//> using lib "org.typelevel::cats-kernel-laws::2.8.0"
//> using lib "eu.timepit::refined::0.10.1"
import cats.kernel._
import cats.kernel.laws.discipline._
import eu.timepit.refined._
import eu.timepit.refined.api._
import eu.timepit.refined.types.numeric._
import eu.timepit.refined.numeric.Positive
import org.scalacheck._
class BugSpec extends Properties("bugged") {
implicit val posByteCommutativeSemigroup: CommutativeSemigroup[PosByte] =
getPosIntegralCommutativeSemigroup[Byte]
private def getPosIntegralCommutativeSemigroup[A: CommutativeSemigroup: NonNegShift](implicit
integral: Integral[A],
v: Validate[A, Positive]
): CommutativeSemigroup[A Refined Positive] =
CommutativeSemigroup.instance { (x, y) =>
val combined: A = Semigroup[A].combine(x.value, y.value)
refineV[Positive](combined).getOrElse {
val result: A =
CommutativeSemigroup[A].combine(NonNegShift[A].shift(combined), integral.one)
refineV[Positive].unsafeFrom(result)
}
}
implicit def eq: Eq[PosByte] = Eq.by(_.value)
implicit def arb: Arbitrary[PosByte] =
Arbitrary(Gen.choose(0.toByte, Byte.MaxValue).map(refineV[Positive](_).toOption.get))
property("propped") = CommutativeSemigroupTests[PosByte].commutativeSemigroup.props(0)._2
}
/**
* Typeclass to shift Negative values to Non Negative values.
*/
trait NonNegShift[T] extends Serializable {
def shift(t: T): T
}
object NonNegShift {
def apply[T](implicit ev: NonNegShift[T]): NonNegShift[T] = ev
def instance[T](function: T => T): NonNegShift[T] =
new NonNegShift[T] {
def shift(t: T): T = function(t)
}
// Instances
implicit val byteNonNegShift: NonNegShift[Byte] = instance(t => (t & Byte.MaxValue).toByte)
implicit val shortNonNegShift: NonNegShift[Short] = instance(t => (t & Short.MaxValue).toShort)
implicit val intNonNegShift: NonNegShift[Int] = instance(t => t & Int.MaxValue)
implicit val longNonNegShift: NonNegShift[Long] = instance(t => t & Long.MaxValue)
}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Scala.NotImplementedError: an implementation is missing?
Except to the fact that your code just throws a NoSuchElementException after recursively going through the list, there is nothing wrong with it....
Read more >scala.NotImplementedError: an implementation is missing? #20
When I start kafka-offset-monitor,I have the following error: 2018-02-27 17:41:14 WARN ServletHandler:586 - Error for /topiclist scala.
Read more >Scala Standard Library 2.13.10 - scala.NotImplementedError
class NotImplementedError extends Error. Throwing this exception can be a temporary replacement for a method body that remains to be implemented ...
Read more >scala.NotImplementedError: an implementation is missing still ...
Hi, I am new to scala and play, and i have a project hold in heroku, i want to use mongodb to save...
Read more >scala/NotImplementedError.scala - xuwei-k.github.com
__ *\ ** ______ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I reopen this issue to investigate why added
scalacheck
test framework isn’t found by default - more info hereMaybe it’s not detecting the Scalacheck framework correctly when using the Cats dependency?