We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.2, 3.0.1
Code below compiles in 3.0.0 (and 2.12-2.13), but fails compilation in 3.0.2 and 3.0.1
Note that even replacing
val a: ZIO[Int, Nothing, Symbol] = Get ~> c(CA())
with
val a: ZIO[Int, Nothing, Symbol] = ???
or moving suite from top level to object or removing useless WithTransformation will fix compilation.
suite
WithTransformation
trait ZIO[-A, +B, +C] trait Spec[-A, +B] def suite[R, E, T](specs: Spec[R, E]*): Spec[R, E] = ??? trait HttpRequest trait RequestContext trait RouteResult case class CA() object CA { implicit val aEv: Ev[CA] = ??? } trait CB trait Ev[T] object CB { implicit def apply[T](a: T)(implicit ev: Ev[T]): CB = ??? } def c(b: CB): RequestContext => Option[RouteResult] = ??? object RouteDefaultRunnableSpec { def assertM[R, E, A](effect: ZIO[R, E, A]): ZIO[R, E, String] = ??? def testM[R, E](assertion: => ZIO[R, E, String]): Spec[R, E] = ??? val Get: HttpRequest = ??? implicit class WithTransformation(request: HttpRequest) { def ~>(f: HttpRequest => HttpRequest): HttpRequest = f(request) } implicit class WithRoute(request: HttpRequest) { def ~>(route: RequestContext => Option[RouteResult]): ZIO[Int, Nothing, Symbol] = ??? } def spec = suite( testM { val a: ZIO[Int, Nothing, Symbol] = Get ~> c(CA()) val res: ZIO[Int, Nothing, String] = assertM(a) res }, ) }
[error] -- [E007] Type Mismatch Error: /file/path/something.scala:48:8 [error] 48 | res [error] | ^^^ [error] | Found: (res : ZIO[Int, Nothing, String]) [error] | Required: ZIO[Any, Any, String]
Code should be compilable. Compilation of this code should not depend on val implementation if type of val is specified manually.
val
The text was updated successfully, but these errors were encountered:
Originally found here: senia-psm/zio-test-akka-http#77
Sorry, something went wrong.
This regressed in #12519
... but it's actually already fixed in 3.1.0-RC1 (and -RC2), apparently by #13361
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.0.2, 3.0.1
Code below compiles in 3.0.0 (and 2.12-2.13), but fails compilation in 3.0.2 and 3.0.1
Minimized code
Note that even replacing
with
or moving
suite
from top level to object or removing uselessWithTransformation
will fix compilation.Output
Expectation
Code should be compilable. Compilation of this code should not depend on
val
implementation if type ofval
is specified manually.The text was updated successfully, but these errors were encountered: