File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,7 @@ class Definitions {
494
494
def DynamicClass (implicit ctx : Context ) = DynamicType .symbol.asClass
495
495
lazy val OptionType : TypeRef = ctx.requiredClassRef(" scala.Option" )
496
496
def OptionClass (implicit ctx : Context ) = OptionType .symbol.asClass
497
+ lazy val NameBasedPatternType : TypeRef = ctx.requiredClassRef(" scala.NameBasedPattern" )
497
498
lazy val ProductType : TypeRef = ctx.requiredClassRef(" scala.Product" )
498
499
def ProductClass (implicit ctx : Context ) = ProductType .symbol.asClass
499
500
lazy val Product_canEqualR = ProductClass .requiredMethodRef(nme.canEqual_)
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ object StdNames {
184
184
final val Function : N = " Function"
185
185
final val ImplicitFunction : N = " ImplicitFunction"
186
186
final val Mirror : N = " Mirror"
187
+ final val NameBasedPattern : N = " NameBasedPattern"
187
188
final val Nothing : N = " Nothing"
188
189
final val Null : N = " Null"
189
190
final val Object : N = " Object"
Original file line number Diff line number Diff line change
1
+ package scala
2
+
3
+ /** Class extending this trait are eligible for name based pattern matching. */
4
+ trait NameBasedPattern
You can’t perform that action at this time.
0 commit comments