Skip to content

Commit 562332a

Browse files
committed
caseStmtMacros no longer experimental, experimental manual refactor
1 parent eb5358d commit 562332a

File tree

7 files changed

+1415
-1396
lines changed

7 files changed

+1415
-1396
lines changed

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
## Language changes
1515

16-
16+
- [Case statement macros](manual.html#macros-case-statement-macros) are no longer experimental,
17+
meaning you no longer need to enable the experimental switch `caseStmtMacros` to use them.
1718

1819
## Compiler changes
1920

compiler/options.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ type
195195
notnil,
196196
dynamicBindSym,
197197
forLoopMacros, # not experimental anymore; remains here for backwards compatibility
198-
caseStmtMacros,
198+
caseStmtMacros, # ditto
199199
codeReordering,
200200
compiletimeFFI,
201201
## This requires building nim with `-d:nimHasLibFFI`

compiler/semstmts.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,10 +987,10 @@ proc semCase(c: PContext, n: PNode; flags: TExprFlags): PNode =
987987
else:
988988
popCaseContext(c)
989989
closeScope(c)
990-
if caseStmtMacros in c.features:
991-
result = handleCaseStmtMacro(c, n, flags)
992-
if result != nil:
993-
return result
990+
#if caseStmtMacros in c.features:
991+
result = handleCaseStmtMacro(c, n, flags)
992+
if result != nil:
993+
return result
994994
localError(c.config, n[0].info, errSelectorMustBeOfCertainTypes)
995995
return
996996
for i in 1..<n.len:

0 commit comments

Comments
 (0)