Skip to content

Pikled expression failing to Ycheck #4891

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

Closed
nicolasstucki opened this issue Aug 4, 2018 · 0 comments
Closed

Pikled expression failing to Ycheck #4891

nicolasstucki opened this issue Aug 4, 2018 · 0 comments

Comments

@nicolasstucki
Copy link
Contributor

def foo: Expr[Option[String]] = '(None)

fails Ycheck with

checking xyz.scala after phase reifyQuotes
exception while typing def foo: quoted.Expr[Option[String]] = 
  scala.runtime.quoted.Unpickler.unpickleExpr[None](
    scala.collection.immutable.Nil.::[String](
      
        "\\¡«\037\0212\0200\00\00\00\00\00\00\00\00\00\00\00\00\03â\06°\0223\01\0204ASTs\01\0204None\01\0205scala\0200\0204s\02016\0202"
      
    )
  , scala.collection.immutable.Nil) of class class dotty.tools.dotc.ast.Trees$DefDef # 673

Where unpickleExpr[None] returns an Expr[None]. Probably the T in Expr should be covariant.

Blaisorblade added a commit that referenced this issue Aug 5, 2018
Fix #4891: Make scala.quoted.Expr covariant
Jasper-M referenced this issue in Jasper-M/dotty Sep 27, 2018
Make subclasses of scala.quoted.Expr covariant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant