simulacrum icon indicating copy to clipboard operation
simulacrum copied to clipboard

Update scala versions

Open sh0hei opened this issue 4 years ago • 5 comments

sh0hei avatar Nov 09 '21 06:11 sh0hei

In our project, we also encountered the following compilation error in Scala 2.13.7. https://github.com/typelevel/simulacrum/runs/4148642944?check_suite_focus=true#step:7:322

[error] /home/runner/work/simulacrum/simulacrum/examples/src/test/scala/simulacrum/examples/examples.scala:124:6: Cannot find a wildcard type in supposed n-arity type constructor
[error]     @typeclass trait Bifunctor[F[_, _]] {

tsuyoshizawa avatar Nov 15 '21 11:11 tsuyoshizawa

I'm having the same problem:

@typeclass
trait Auth[F[_]] {
  def auth(req: Request[F]): OptionT[F, User]
}

object Auth {
  def fromCookie[F[_] :Monad :Sessions :Users]: Auth[F] =
    req => Sessions[F].read(req).fold(OptionT.none[F, User])(Users[F].findLoggedIn)
}
[error] /Users/ashkan/Hobby/Shahname/jvm/src/main/scala/ir/ashkan/shahnameh/Auth.scala:9:2: Cannot find a wildcard type in supposed n-arity type constructor
[error] @typeclass

ashkann avatar Dec 04 '21 21:12 ashkann

I'm having the same problem in coursier here (https://github.com/coursier/coursier/pull/2327).

alexarchambault avatar Feb 01 '22 16:02 alexarchambault

Same issue with Scala 2.13.8

\src\main\scala\autocopy\helpers.scala:17:4: Cannot find a wildcard type in supposed n-arity type constructor
[error]   @typeclass trait Empty[F[_]] {

AmerPandzo avatar Mar 28 '22 14:03 AmerPandzo

For those who encoutered this error - I created a fork (& published) in which simulacrum is updated to work with recent 2.12 & 2.13 compiler versions: https://github.com/leviysoft/simulacrum

danslapman avatar Sep 15 '24 21:09 danslapman