Skip to content
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

Quasiquotes fail to match a typechecked case class #8312

Closed
scabug opened this issue Feb 18, 2014 · 2 comments
Closed

Quasiquotes fail to match a typechecked case class #8312

scabug opened this issue Feb 18, 2014 · 2 comments

Comments

@scabug
Copy link

scabug commented Feb 18, 2014

For parsed case classes this code is correct:

scala> val q"{ case class $_(..$_) extends ..$_ {..$_}; ..$_ }" = q"{ case class A() }"

But typechecked tree can't be matched:

scala> val q"{ case class $_(..$_) extends ..$_ {..$_}; ..$_ }" = toolbox.typecheck(q"{ case class A() }")
scala.MatchError: {
  case class A extends AnyRef with Product with Serializable {
    def <init>(): A = {
      A.super.<init>();
      ()
    };
    ...
  };
  <synthetic> object A extends scala.runtime.AbstractFunction0[A] with Serializable {
    ...
} (of class scala.reflect.internal.Trees$Block)
  ... 32 elided
@scabug
Copy link
Author

scabug commented Feb 18, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8312?orig=1
Reporter: @VladimirNik
Affected Versions: 2.11.0-M8

@SethTisue
Copy link
Member

closing all quasiquotes tickets; see #10755

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

2 participants