-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
Can't compile quotations matching with HK type arguments involved #9360
Labels
area:metaprogramming:quotes
Issues related to quotes and splices
Comments
And here is failing to check lower bound 'Nothing': package a
import scala.quoted._
trait CPM[F[_]]
def fun[M[_],T](t:M[T])(using m:CPM[M]):M[T] = ???
object M {
inline def transform[F[_],T](t:T): F[T] =
${ transformImpl[F,T]('t) }
def transformImpl[F[_]:Type,T:Type](t:Expr[T])(using qctx:QuoteContext):Expr[F[T]] = {
import qctx.tasty._
t match {
case '{ a.fun[$mt,$tt]($t)(using $m) } => ???
}
}
} result:
|
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
May 2, 2023
Closes scala#9360
The correct way to set the bound of case '{ type mt[_]; a.fun[`mt`, tt]($t)(using $m) } => ??? After #17362 we will be able to write case '{ type mt[_]; a.fun[mt, tt]($t)(using $m) } => ??? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimized code
Output
Expectation
should compile
The text was updated successfully, but these errors were encountered: