work in progress: 'sink' and 'lent' types
This commit is contained in:
parent
06e68feadb
commit
e316665b7b
5 changed files with 16 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue