summary refs log tree commit diff stats
path: root/compiler/passes.nim
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-05-16 12:38:53 +0200
committerdef <dennis@felsin9.de>2015-05-16 12:38:53 +0200
commitdef61c9fcd618ef9a58dd4671978bff7ceaf601a (patch)
tree81017e1b000c6c4bf895e0dc96a68c13ecf976b7 /compiler/passes.nim
parent1c0bbcff5a3d5176409245fdd685587d14ce64e3 (diff)
downloadNim-def61c9fcd618ef9a58dd4671978bff7ceaf601a.tar.gz
Clean up stdin file reading of compiler.
Uses "stdinfile" as the module identifier now, which prevents problems
with - colliding with the minus operator. This fixes #2422 and #2702.
Diffstat (limited to 'compiler/passes.nim')
-rw-r--r--compiler/passes.nim6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/passes.nim b/compiler/passes.nim
index 129d8ad47..e031dae10 100644
--- a/compiler/passes.nim
+++ b/compiler/passes.nim
@@ -170,11 +170,7 @@ proc processModule(module: PSym, stream: PLLStream, rd: PRodReader) =
     openPasses(a, module)
     if stream == nil:
       let filename = fileIdx.toFullPathConsiderDirty
-      if module.name.s == "-":
-        module.name.s = "stdinfile"
-        s = llStreamOpen(stdin)
-      else:
-        s = llStreamOpen(filename, fmRead)
+      s = llStreamOpen(filename, fmRead)
       if s == nil:
         rawMessage(errCannotOpenFile, filename)
         return