-
Notifications
You must be signed in to change notification settings - Fork 1.1k
cast fail when have HK-type unreducted, but equal expression as type. #9518
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
Comments
full sbt projet |
Minimized import scala.quoted._
trait CB[T]
inline def shift : Unit = ${ shiftTerm }
def shiftTerm(using QuoteContext): Expr[Unit] = {
import qctx.tasty._
val nTree = '{ ??? : CB[Int] }.unseal
val tp1 = '[CB[Int]].unseal.tpe
val tp2 = '[([X] =>> CB[X])[Int]].unseal.tpe
val ta = '[[X] =>> CB[X]]
val tp3 = '[ta.T[Int]].unseal.tpe
val tp4 = AppliedType('[CB].unseal.tpe, List(typeOf[Int]))
assert(nTree.tpe <:< tp1)
assert(nTree.tpe <:< tp2)
assert(nTree.tpe <:< tp3)
assert(nTree.tpe <:< tp4) // fails but should not
'{}
} def test: Unit = shift |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 1, 2020
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 2, 2020
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 2, 2020
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 2, 2020
nicolasstucki
added a commit
that referenced
this issue
Sep 3, 2020
Fix #9518: Instantiate HKTypeLambda in AppliedTypes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Minimized code
X.scala:
and
Main.scala
Output
Expectation
should compiled
The text was updated successfully, but these errors were encountered: