further steps in implementing sink parameters; refs #7041
This commit is contained in:
parent
1d9343080d
commit
9de05ec3e0
10 changed files with 177 additions and 20 deletions
|
|
@ -617,6 +617,11 @@ type
|
|||
##
|
||||
## This is only raised if the ``segfaults.nim`` module was imported!
|
||||
|
||||
when defined(nimNewRuntime):
|
||||
type
|
||||
MoveError* = object of SystemError ## \
|
||||
## Raised on attempts to re-sink an already consumed ``sink`` parameter.
|
||||
|
||||
{.deprecated: [TObject: RootObj, PObject: RootRef, TEffect: RootEffect,
|
||||
FTime: TimeEffect, FIO: IOEffect, FReadIO: ReadIOEffect,
|
||||
FWriteIO: WriteIOEffect, FExecIO: ExecIOEffect,
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ proc chckNil(p: pointer) =
|
|||
if p == nil:
|
||||
sysFatal(NilAccessError, "attempt to write to a nil address")
|
||||
|
||||
when defined(nimNewRuntime):
|
||||
proc chckMove(b: bool) {.compilerproc.} =
|
||||
if not b:
|
||||
sysFatal(MoveError, "attempt to access an object that was moved")
|
||||
|
||||
proc chckNilDisp(p: pointer) {.compilerproc.} =
|
||||
if p == nil:
|
||||
sysFatal(NilAccessError, "cannot dispatch; dispatcher is nil")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue