Skip to content

Pikled expression failing to Ycheck #4891

Closed
@nicolasstucki

Description

@nicolasstucki
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions