Skip to content

Commit 4d4d592

Browse files
committed
Update docs and change exception
1 parent f8e337d commit 4d4d592

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/quoted/Toolbox.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object Toolbox {
2525
case expr: LiftedExpr[T] =>
2626
expr.value
2727
case expr: TastyTreeExpr[Tree] @unchecked =>
28-
throw new scala.quoted.QuoteError("Can't run and scala.quoted.Expr coming from a macro argument")
28+
throw new Exception("Cannot call `Expr.run` on an `Expr` that comes from an inline macro argument.")
2929
case _ =>
3030
new QuoteDriver().run(expr, runSettings)
3131
}

library/src/scala/quoted/Expr.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object Exprs {
4848
* These expressions are used for arguments of inline macros. They contain and actual tree
4949
* from the program that is being expanded by the macro.
5050
*
51-
* May contain references to code defined outside this Expr instance.
51+
* May contain references to code defined outside this TastyTreeExpr instance.
5252
*/
5353
final class TastyTreeExpr[Tree](val tree: Tree) extends quoted.Expr[Any] {
5454
override def toString: String = s"Expr(<tasty tree>)"

0 commit comments

Comments
 (0)