File tree Expand file tree Collapse file tree 10 files changed +14
-14
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 10 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ object Feature:
3737 val modularity = experimental(" modularity" )
3838 val quotedPatternsWithPolymorphicFunctions = experimental(" quotedPatternsWithPolymorphicFunctions" )
3939 val packageObjectValues = experimental(" packageObjectValues" )
40- val matchWithSubCases = experimental(" matchWithSubCases " )
40+ val subCases = experimental(" subCases " )
4141
4242 def experimentalAutoEnableFeatures (using Context ): List [TermName ] =
4343 defn.languageExperimentalFeatures
Original file line number Diff line number Diff line change @@ -3108,7 +3108,7 @@ object Parsers {
31083108 (withinMatchPattern(pattern()), guard())
31093109 }
31103110 val body =
3111- if in.token == WITH && in.featureEnabled(Feature .matchWithSubCases ) then atSpan(in.skipToken()):
3111+ if in.token == WITH && in.featureEnabled(Feature .subCases ) then atSpan(in.skipToken()):
31123112 subMatchClause(simpleExpr(Location .ElseWhere ))
31133113 else atSpan(accept(ARROW )):
31143114 if exprOnly then
Original file line number Diff line number Diff line change @@ -350,10 +350,10 @@ object language {
350350 @ compileTimeOnly(" `packageObjectValues` can only be used at compile time in import statements" )
351351 object packageObjectValues
352352
353- /** Experimental support for match expressions with sub- cases.
353+ /** Experimental support for match expressions with sub cases.
354354 */
355- @ compileTimeOnly(" `matchWithSubCases ` can only be used at compile time in import statements" )
356- object matchWithSubCases
355+ @ compileTimeOnly(" `subCases ` can only be used at compile time in import statements" )
356+ object subCases
357357
358358 }
359359
Original file line number Diff line number Diff line change @@ -155,10 +155,10 @@ object language:
155155 @ compileTimeOnly(" `packageObjectValues` can only be used at compile time in import statements" )
156156 object packageObjectValues
157157
158- /** Experimental support for match expressions with sub- cases.
158+ /** Experimental support for match expressions with sub cases.
159159 */
160- @ compileTimeOnly(" `matchWithSubCases ` can only be used at compile time in import statements" )
161- object matchWithSubCases
160+ @ compileTimeOnly(" `subCases ` can only be used at compile time in import statements" )
161+ object subCases
162162 end experimental
163163
164164 /** The deprecated object contains features that are no longer officially suypported in Scala.
Original file line number Diff line number Diff line change 1- import scala .language .experimental .matchWithSubCases
1+ import scala .language .experimental .subCases
22
33object Test :
44
Original file line number Diff line number Diff line change 1- import scala .language .experimental .matchWithSubCases
1+ import scala .language .experimental .subCases
22
33object Test :
44 val x : Option [Option [Int ]] = ???
Original file line number Diff line number Diff line change 1- import scala .language .experimental .matchWithSubCases
1+ import scala .language .experimental .subCases
22
33enum E extends Exception :
44 case A (x : Any )
Original file line number Diff line number Diff line change 1- import scala .language .experimental .matchWithSubCases
1+ import scala .language .experimental .subCases
22
33enum E :
44 case A (e : E )
Original file line number Diff line number Diff line change 1- import scala .language .experimental .matchWithSubCases
1+ import scala .language .experimental .subCases
22
33val pf : PartialFunction [Option [Option [Int ]], String ] =
44 case Some (x2) with x2 match
Original file line number Diff line number Diff line change 1- import scala .language .experimental .matchWithSubCases
1+ import scala .language .experimental .subCases
22
33enum E :
44 case A (e : E )
You can’t perform that action at this time.
0 commit comments