-
Notifications
You must be signed in to change notification settings - Fork 1
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 use q"<foo></foo>" to match the passing tree #1
Comments
Some investigation: def info(s: String) = {
c.info(c.enclosingPosition, s, force = true)
}
info(
s"""
|============================
|passing elem:
|${showCode(elem)}
|--------------------------
|${showCode(q"<foo></foo>")}
|============================
""".stripMargin) Will print:
|
Hi @freewind, please see this stackoverflow answer. |
Seems I need to write: val q"${result: scala.xml.Elem}" = elem
val q"<foo></foo>" = q"$result" It can match this time, is it expected usage? |
Thanks, just noticed you reply, I will see that answer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the code:
If I define the
manipulate
as:It can never match:
The text was updated successfully, but these errors were encountered: