File tree 2 files changed +1
-17
lines changed
library/src-bootstrapped/scala/quoted
tests/run-macros/power-macro 2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,6 @@ class Expr[+T] private[scala] {
13
13
def show (syntaxHighlight : SyntaxHighlight )(using qctx : QuoteContext ): String =
14
14
this .unseal.showWith(syntaxHighlight)
15
15
16
- /** Return the value of this expression.
17
- *
18
- * Returns `None` if the expression does not contain a value or contains side effects.
19
- * Otherwise returns the `Some` of the value.
20
- */
21
- @ deprecated(" Use Expr.unlift" , " 0.23" )
22
- final def getValue [U >: T ](using qctx : QuoteContext , unlift : Unliftable [U ]): Option [U ] = unlift(this )
23
-
24
16
/** Return the unlifted value of this expression.
25
17
*
26
18
* Returns `None` if the expression does not contain a value or contains side effects.
@@ -29,14 +21,6 @@ class Expr[+T] private[scala] {
29
21
final def unlift [U >: T ](using qctx : QuoteContext , unlift : Unliftable [U ]): Option [U ] =
30
22
unlift(this )
31
23
32
- /** Return the unlifted value of this expression.
33
- *
34
- * Emits an error error and throws if the expression does not contain a value or contains side effects.
35
- * Otherwise returns the value.
36
- */
37
- @ deprecated(" Use Expr.unliftOrError" , " 0.23" )
38
- final def value [U >: T ](using qctx : QuoteContext , unlift : Unliftable [U ]): U = unliftOrError
39
-
40
24
/** Return the unlifted value of this expression.
41
25
*
42
26
* Emits an error and throws if the expression does not contain a value or contains side effects.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import scala.quoted._
4
4
inline def power (x : Double , inline n : Int ) = $ { powerCode1(' x , ' n ) }
5
5
6
6
private def powerCode1 (using qctx : QuoteContext )(x : Expr [Double ], n : Expr [Int ]): Expr [Double ] =
7
- powerCode(x, n.value )
7
+ powerCode(x, n.unliftOrError )
8
8
9
9
private def powerCode (using qctx : QuoteContext )(x : Expr [Double ], n : Int ): Expr [Double ] =
10
10
if (n == 0 ) Expr (1.0 )
You can’t perform that action at this time.
0 commit comments