WIP: disallow 'nil' for strings and seqs

This commit is contained in:
Andreas Rumpf 2018-08-13 11:41:33 +02:00
commit dae5450947
43 changed files with 207 additions and 173 deletions

View file

@ -377,7 +377,10 @@ when not defined(js):
proc ssClose(s: Stream) =
var s = StringStream(s)
s.data = nil
when defined(nimNoNilSeqs):
s.data = ""
else:
s.data = nil
proc newStringStream*(s: string = ""): StringStream =
## creates a new stream from the string `s`.