summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
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/semstmts.nim
parent8507e506cedc24dca91632092f3899602a262276 (diff)
downloadNim-8d850f7a69d473360c5b1a9db9fd998ab9b5dff4.tar.gz
deprecated ospaths (#9665)
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
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)