summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-29 16:54:50 +0200
committerAraq <rumpf_a@web.de>2018-09-29 16:54:59 +0200
commit40e01d8549ce3c278dbe791d7af4f1e73b4d56da (patch)
treef0b2c4b7beae7270f752bf1f35dd9059ac668494 /compiler/semstmts.nim
parent2dfd09b1bef5c7d7dcba02b8c80856bce7aa685e (diff)
downloadNim-40e01d8549ce3c278dbe791d7af4f1e73b4d56da.tar.gz
don't require an implementation for procs marked with .error; activate the move optimizer for destructors
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 d5c5b7f86..f2cb2dcb3 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1677,7 +1677,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
   else:
     if s.kind == skMethod: semMethodPrototype(c, s, n)
     if proto != nil: localError(c.config, n.info, errImplOfXexpected % proto.name.s)
-    if {sfImportc, sfBorrow} * s.flags == {} and s.magic == mNone:
+    if {sfImportc, sfBorrow, sfError} * s.flags == {} and s.magic == mNone:
       incl(s.flags, sfForward)
     elif sfBorrow in s.flags: semBorrow(c, n, s)
   sideEffectsCheck(c, s)