Skip to content

Commit ea93524

Browse files
Use Object.toString for quoted.{Expr, Type} (scala#16663)
Alternative to scala#16556. The default to string implementation gives more information on the expression or type than `'{...}` or `Type.of[..]`. With this string representation, we will know the class and instance hash.
2 parents 3800c91 + 80c1556 commit ea93524

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

compiler/src/scala/quoted/runtime/impl/ExprImpl.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ final class ExprImpl(val tree: tpd.Tree, val scope: Scope) extends Expr[Any] {
2020
}
2121

2222
override def hashCode(): Int = tree.hashCode()
23-
24-
override def toString: String = "'{ ... }"
2523
}

compiler/src/scala/quoted/runtime/impl/TypeImpl.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ final class TypeImpl(val typeTree: tpd.Tree, val scope: Scope) extends Type[?] {
1414
}
1515

1616
override def hashCode(): Int = typeTree.hashCode()
17-
18-
override def toString: String = "Type.of[...]"
1917
}

0 commit comments

Comments
 (0)