File tree Expand file tree Collapse file tree 2 files changed +0
-8
lines changed
library/src-bootstrapped/scala/quoted Expand file tree Collapse file tree 2 files changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,6 @@ abstract class Expr[+T] private[scala] {
29
29
def isExprOf [X ](using tp : scala.quoted.Type [X ])(using qctx : QuoteContext ): Boolean =
30
30
this .unseal.tpe <:< tp.unseal.tpe
31
31
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
-
39
32
/** Convert this to an `quoted.Expr[X]` if this expression is a valid expression of type `X` or throws */
40
33
def asExprOf [X ](using tp : scala.quoted.Type [X ])(using qctx : QuoteContext ): scala.quoted.Expr [X ] = {
41
34
if isExprOf[X ] then
Original file line number Diff line number Diff line change 1
1
import scala .quoted ._
2
2
import scala .quoted .staging ._
3
- import scala .quoted .util ._
4
3
import language .experimental .namedTypeArguments
5
4
6
5
/**
You can’t perform that action at this time.
0 commit comments