summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-05-01 00:28:11 +0200
committerAraq <rumpf_a@web.de>2013-05-01 00:28:11 +0200
commiteaeb26f0037b04f58b755770e3ba401cb0b877a2 (patch)
tree1437a64e3933eb19db116f176d8afc435c347c51
parent427f84b4ec8e6d7d933b1b8142266aa5fa191a3e (diff)
downloadNim-eaeb26f0037b04f58b755770e3ba401cb0b877a2.tar.gz
re.nim compiles again
-rw-r--r--lib/impure/re.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/impure/re.nim b/lib/impure/re.nim
index 57dc3a313..ef02a3b1d 100644
--- a/lib/impure/re.nim
+++ b/lib/impure/re.nim
@@ -239,8 +239,9 @@ template `=~` *(s: string, pattern: TRegEx): expr =
   ##   else:
   ##     echo("syntax error")
   ##
+  bind maxSubPatterns
   when not definedInScope(matches):
-    var matches {.inject.}: array[0..re.maxSubPatterns-1, string]
+    var matches {.inject.}: array[0..maxSubPatterns-1, string]
   match(s, pattern, matches)
 
 # ------------------------- more string handling ------------------------------