diff --git a/lib/impure/re.nim b/lib/impure/re.nim index ebc4c549a1..7ef3d247af 100755 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -237,7 +237,7 @@ template `=~` *(s: string, pattern: TRegEx): expr = ## echo("syntax error") ## when not definedInScope(matches): - var matches: array[0..maxSubPatterns-1, string] + var matches: array[0..re.maxSubPatterns-1, string] match(s, pattern, matches) # ------------------------- more string handling ------------------------------ diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 0a7c95a709..ff88c56b8c 100755 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -865,7 +865,7 @@ template `=~`*(s: string, pattern: TPeg): bool = ## echo("syntax error") ## when not definedInScope(matches): - var matches: array[0..maxSubpatterns-1, string] + var matches: array[0..pegs.maxSubpatterns-1, string] match(s, pattern, matches) # ------------------------- more string handling ------------------------------