summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-01-31 08:01:07 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-01-31 08:01:07 +0100
commit7648eb45b3ed4979082d6c59d1df92005a957393 (patch)
tree53f5a5a37e0c12763319807939bed90493e3ad98
parenta605fa8ba6e0b6205d3f3d8b141242874451957b (diff)
parenta37e47d069a6403d7e24ba8691969df3a85d066d (diff)
downloadNim-7648eb45b3ed4979082d6c59d1df92005a957393.tar.gz
Merge branch 'devel' of github.com:nim-lang/Nim into devel
-rw-r--r--compiler/sempass2.nim2
-rw-r--r--lib/system.nim6
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index d427750e4..e560c18c8 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -747,7 +747,7 @@ proc track(tracked: PEffects, n: PNode) =
       # may not look like an assignment, but it is:
       let arg = n.sons[1]
       initVarViaNew(tracked, arg)
-      if {tfNeedsInit} * arg.typ.lastSon.flags != {}:
+      if arg.typ.len != 0 and {tfNeedsInit} * arg.typ.lastSon.flags != {}:
         if a.sym.magic == mNewSeq and n[2].kind in {nkCharLit..nkUInt64Lit} and
             n[2].intVal == 0:
           # var s: seq[notnil];  newSeq(s, 0)  is a special case!
diff --git a/lib/system.nim b/lib/system.nim
index 4e071e802..079b06b48 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -3025,9 +3025,9 @@ when not defined(JS): #and not defined(nimscript):
     proc endOfFile*(f: File): bool {.tags: [], benign.}
       ## Returns true iff `f` is at the end.
 
-    proc readChar*(f: File): char {.tags: [ReadIOEffect], deprecated.}
-      ## Reads a single character from the stream `f`. **Deprecated** since
-      ## version 0.16.2. Use some variant of ``readBuffer`` instead.
+    proc readChar*(f: File): char {.tags: [ReadIOEffect].}
+      ## Reads a single character from the stream `f`. Should not be used in
+      ## performance sensitive code.
 
     proc flushFile*(f: File) {.tags: [WriteIOEffect].}
       ## Flushes `f`'s buffer.