Skip to content

Commit 89792a2

Browse files
committed
Remove toExprOf
1 parent e32da05 commit 89792a2

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

library/src-bootstrapped/scala/quoted/Expr.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ abstract class Expr[+T] private[scala] {
2929
def isExprOf[X](using tp: scala.quoted.Type[X])(using qctx: QuoteContext): Boolean =
3030
this.unseal.tpe <:< tp.unseal.tpe
3131

32-
/** Convert this to an `Some[quoted.Expr[X]]` if this expression is a valid expression of type `X`.
33-
* Otherwise returns None.
34-
*/
35-
def toExprOf[X](using tp: scala.quoted.Type[X])(using qctx: QuoteContext): Option[scala.quoted.Expr[X]] =
36-
if isExprOf[X] then Some(this.asInstanceOf[scala.quoted.Expr[X]])
37-
else None
38-
3932
/** Convert this to an `quoted.Expr[X]` if this expression is a valid expression of type `X` or throws */
4033
def asExprOf[X](using tp: scala.quoted.Type[X])(using qctx: QuoteContext): scala.quoted.Expr[X] = {
4134
if isExprOf[X] then

0 commit comments

Comments
 (0)