diff options
author | Araq <rumpf_a@web.de> | 2018-01-07 10:17:19 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-01-07 10:17:19 +0100 |
commit | e316665b7b25b3e45a66766260bfa645c92beb97 (patch) | |
tree | bde3eaaf190e9701cecdbc4445dbeb7485303968 /lib | |
parent | 06e68feadb4becb653e5e55fd2ef85e1eafd9ba4 (diff) | |
download | Nim-e316665b7b25b3e45a66766260bfa645c92beb97.tar.gz |
work in progress: 'sink' and 'lent' types
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index 4d8610737..de91c4dda 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -249,6 +249,10 @@ type when defined(nimHasOpt): type opt*{.magic: "Opt".}[T] +when defined(nimHasSink): + type sink*{.magic: "BuiltinType".}[T] + type lent*{.magic: "BuiltinType".}[T] + proc high*[T: Ordinal](x: T): T {.magic: "High", noSideEffect.} ## returns the highest possible index of an array, a sequence, a string or ## the highest possible value of an ordinal value `x`. As a special |