Skip to content

Commit 08ca895

Browse files
Add scala.language.experimental.matchWithSubCases
1 parent e605fa1 commit 08ca895

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

compiler/src/dotty/tools/dotc/config/Feature.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ object Feature:
3737
val modularity = experimental("modularity")
3838
val quotedPatternsWithPolymorphicFunctions = experimental("quotedPatternsWithPolymorphicFunctions")
3939
val packageObjectValues = experimental("packageObjectValues")
40+
val matchWithSubCases = experimental("matchWithSubCases")
4041

4142
def experimentalAutoEnableFeatures(using Context): List[TermName] =
4243
defn.languageExperimentalFeatures

library/src/scala/runtime/stdLibPatches/language.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ object language:
154154
*/
155155
@compileTimeOnly("`packageObjectValues` can only be used at compile time in import statements")
156156
object packageObjectValues
157+
158+
/** Experimental support for match expressions with sub-cases.
159+
*/
160+
@compileTimeOnly("`matchWithSubCases` can only be used at compile time in import statements")
161+
object matchWithSubCases
157162
end experimental
158163

159164
/** The deprecated object contains features that are no longer officially suypported in Scala.

0 commit comments

Comments
 (0)