Skip to content

Printers.show in scala-reflect double quoted some keywords #10685

Open
@Atry

Description

@Atry
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_152).
Type in expressions for evaluation. Or try :help.

scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._

scala> q"`if` `else` `while`"
res0: $r.intp.global.Tree = `if`.`else`(``while``)

scala> showCode(res0)
res1: String = `if`.`else`(`while`)

scala> show(res0)
res2: String = `if`.`else`(``while``)

scala> show(q"a b c")
res3: String = a.b(c)

I expect while is always quoted as

`while`

, not

``while``

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions