Skip to content

Align quote and TASTy show method names #9496

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/src-bootstrapped/scala/quoted/Expr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ abstract class Expr[+T] private[scala] {
this.unseal.showWith(SyntaxHighlight.plain)

/** Show a source code like representation of this expression */
def show(syntaxHighlight: SyntaxHighlight)(using qctx: QuoteContext): String =
def showWith(syntaxHighlight: SyntaxHighlight)(using qctx: QuoteContext): String =
this.unseal.showWith(syntaxHighlight)

/** Return the unlifted value of this expression.
Expand Down
2 changes: 1 addition & 1 deletion library/src-bootstrapped/scala/quoted/Type.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class Type[X <: AnyKind] private[scala] {
this.unseal.showWith(SyntaxHighlight.plain)

/** Show a source code like representation of this type */
def show(syntaxHighlight: SyntaxHighlight)(using qctx: QuoteContext): String =
def showWith(syntaxHighlight: SyntaxHighlight)(using qctx: QuoteContext): String =
this.unseal.showWith(syntaxHighlight)

/** View this expression `quoted.Type[T]` as a `TypeTree` */
Expand Down
2 changes: 1 addition & 1 deletion tests/run-macros/i6270/Macro_1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ object api {

private def reflImplColor(x: Expr[String])(using qctx: QuoteContext) : Expr[String] = {
import qctx.tasty._
Expr(x.show(ANSI))
Expr(x.showWith(ANSI))
}
}