Skip to content

Print internal representation of ' and $ with -Yprint-debug #6317

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

Merged
merged 1 commit into from
Apr 16, 2019

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Apr 16, 2019

sbt:dotty> dotc Foo.scala -Xprint:front
result of Foo.scala after frontend:
package <empty> {
  class Foo() extends Object() { 
    def foo(i: quoted.Expr[Int]): quoted.Expr[Int] = 
      '{
        {
          val a: Int = ${i}
          a:Int
        }
      }
  }
}

sbt:dotty> dotc Foo.scala -Xprint:front -Yprint-debug
result of Foo.scala after frontend:
package <empty> {
  class Foo() extends Object.<init>() { 
    def foo(i: quoted.Expr[Int]): quoted.Expr[Int] = 
      scala.internal.Quoted.exprQuote[Int^](
        {
          val a: Int = scala.internal.Quoted.exprSplice[Int^](i)
          a:Int
        }
      )
  }
}

@nicolasstucki nicolasstucki marked this pull request as ready for review April 16, 2019 13:09
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicolasstucki nicolasstucki merged commit b066d8b into scala:master Apr 16, 2019
@ghost ghost removed the stat:needs review label Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants