* fixes #18858 [backport] * ensure async tests work with --experimental:strictEffects [backport] * ensure async tests work with --experimental:strictEffects [backport]
This commit is contained in:
parent
ca51bb8fd9
commit
3241df2a13
4 changed files with 11 additions and 3 deletions
|
|
@ -705,8 +705,11 @@ proc capitalize*(s: string): string {.noSideEffect,
|
|||
fastRuneAt(s, i, rune, doInc = true)
|
||||
result = $toUpper(rune) & substr(s, i)
|
||||
|
||||
when not defined(nimHasEffectsOf):
|
||||
{.pragma: effectsOf.}
|
||||
|
||||
proc translate*(s: string, replacements: proc(key: string): string): string {.
|
||||
rtl, extern: "nuc$1".} =
|
||||
rtl, extern: "nuc$1", effectsOf: replacements.} =
|
||||
## Translates words in a string using the ``replacements`` proc to substitute
|
||||
## words inside ``s`` with their replacements.
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue