Skip to content

Commit 27617b1

Browse files
committed
Remove toExprOf
1 parent e32da05 commit 27617b1

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
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

tests/run-staging/staged-streams_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import scala.quoted._
22
import scala.quoted.staging._
3-
import scala.quoted.util._
43
import language.experimental.namedTypeArguments
54

65
/**

0 commit comments

Comments
 (0)