File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 33 |^^^^^^
44 |Failed to evaluate macro annotation '@crash'.
55 | Caused by class scala.NotImplementedError: an implementation is missing
6- | scala.Predef$.$qmark$qmark$qmark(Predef.scala:400 )
6+ | scala.Predef$.$qmark$qmark$qmark(Predef.scala:401 )
77 | crash.transform(Macro_1.scala:7)
Original file line number Diff line number Diff line change 33 | ^^^^^^^^^^^^^^^^^^
44 | Exception occurred while executing macro expansion.
55 | java.lang.IllegalArgumentException: requirement failed: value of StringConstant cannot be `null`
6- | at scala.Predef$.require(Predef.scala:393 )
6+ | at scala.Predef$.require(Predef.scala:394 )
77 | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2542)
88 | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2541)
99 | at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:82)
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ val experimentalDefinitionInLibrary = Set(
7979 " scala.quoted.Quotes.reflectModule.RenameSelectorModule.apply" ,
8080 " scala.quoted.Quotes.reflectModule.SimpleSelectorModule.apply" ,
8181
82+ // New feature: fromNullable for explicit nulls
83+ " scala.Predef$.fromNullable" ,
84+
8285 // New feature: modularity
8386 " scala.Precise" ,
8487 " scala.annotation.internal.WitnessNames" ,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ object Example:
2828 import scala .quoted .*
2929 given OptionFromExpr [T ](using Type [T ], FromExpr [T ]): FromExpr [Option [T ]] with
3030 def unapply (x : Expr [Option [T ]])(using Quotes ) = x match
31- case ' { Option [T ]($ {Expr (y)}) } => Some (Option (y))
31+ case ' { Option [T ]($ {Expr (y)}: T ) } => Some (Option (y))
3232 case ' { None } => Some (None )
3333 case ' { $ {Expr (opt)} : Some [T ] } => Some (opt)
3434 case _ => None
@@ -37,7 +37,7 @@ object ExampleWithoutWith:
3737 import scala .quoted .*
3838 given [T ] => (Type [T ], FromExpr [T ]) => FromExpr [Option [T ]]:
3939 def unapply (x : Expr [Option [T ]])(using Quotes ) = x match
40- case ' { Option [T ]($ {Expr (y)}) } => Some (Option (y))
40+ case ' { Option [T ]($ {Expr (y)}: T ) } => Some (Option (y))
4141 case ' { None } => Some (None )
4242 case ' { $ {Expr (opt)} : Some [T ] } => Some (opt)
4343 case _ => None
You can’t perform that action at this time.
0 commit comments