summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-11-09 16:36:49 +0100
committerGitHub <noreply@github.com>2018-11-09 16:36:49 +0100
commit8d850f7a69d473360c5b1a9db9fd998ab9b5dff4 (patch)
tree5debabc119da6ed297d915614d0ec028fc1f534b /compiler
parent8507e506cedc24dca91632092f3899602a262276 (diff)
downloadNim-8d850f7a69d473360c5b1a9db9fd998ab9b5dff4.tar.gz
deprecated ospaths (#9665)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/condsyms.nim1
-rw-r--r--compiler/reorder.nim2
-rw-r--r--compiler/semstmts.nim2
-rw-r--r--compiler/vmops.nim6
4 files changed, 6 insertions, 5 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim
index 648dcd8c4..ab89481b8 100644
--- a/compiler/condsyms.nim
+++ b/compiler/condsyms.nim
@@ -85,6 +85,7 @@ proc initDefines*(symbols: StringTableRef) =
   defineSymbol("nimHasUserErrors")
   defineSymbol("nimUncheckedArrayTyp")
   defineSymbol("nimHasTypeof")
+  defineSymbol("nimErrorProcCanHaveBody")
 
   defineSymbol("nimHasNilSeqs")
   for f in low(Feature)..high(Feature):
diff --git a/compiler/reorder.nim b/compiler/reorder.nim
index 07462bb3e..8c4d0d307 100644
--- a/compiler/reorder.nim
+++ b/compiler/reorder.nim
@@ -1,6 +1,6 @@
 
 import
-  intsets, ast, idents, algorithm, renderer, parser, ospaths, strutils,
+  intsets, ast, idents, algorithm, renderer, parser, os, strutils,
   sequtils, msgs, modulegraphs, syntaxes, options, modulepaths, tables,
   lineinfos
 
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index a2ca50fda..3a00a54c2 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1670,7 +1670,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
       localError(c.config, n.info, "the overloaded " & s.name.s &
         " operator has to be enabled with {.experimental: \"callOperator\".}")
 
-  if n.sons[bodyPos].kind != nkEmpty:
+  if n.sons[bodyPos].kind != nkEmpty and sfError notin s.flags:
     # for DLL generation it is annoying to check for sfImportc!
     if sfBorrow in s.flags:
       localError(c.config, n.sons[bodyPos].info, errImplOfXNotAllowed % s.name.s)
diff --git a/compiler/vmops.nim b/compiler/vmops.nim
index 3a1614f0b..b34221f9b 100644
--- a/compiler/vmops.nim
+++ b/compiler/vmops.nim
@@ -112,9 +112,9 @@ proc registerAdditionalOps*(c: PCtx) =
   registerCallback(c, "stdlib.math.mod", `mod Wrapper`)
 
   when defined(nimcore):
-    wrap2s(getEnv, ospathsop)
-    wrap1s(existsEnv, ospathsop)
-    wrap2svoid(putEnv, ospathsop)
+    wrap2s(getEnv, osop)
+    wrap1s(existsEnv, osop)
+    wrap2svoid(putEnv, osop)
     wrap1s(dirExists, osop)
     wrap1s(fileExists, osop)
     wrap2svoid(writeFile, systemop)