correct comparisons for nil strings/seqs

This commit is contained in:
Andreas Rumpf 2018-04-28 15:13:44 +02:00
commit f64f9e50cc
7 changed files with 91 additions and 23 deletions

View file

@ -645,7 +645,6 @@ template replaceImpl(str: string, pattern: Regex,
let bounds = match.matchBounds
result.add(str.substr(lastIdx, bounds.a - 1))
let nextVal = replacement
assert(nextVal != nil)
result.add(nextVal)
lastIdx = bounds.b + 1