cleanup Ordinal (#13501)
This commit is contained in:
parent
42dad3a836
commit
6a0e87eb38
7 changed files with 36 additions and 10 deletions
|
|
@ -87,6 +87,18 @@ proc defined*(x: untyped): bool {.magic: "Defined", noSideEffect, compileTime.}
|
|||
## # Do here programmer friendly expensive sanity checks.
|
||||
## # Put here the normal code
|
||||
|
||||
when defined(nimHashOrdinalFixed):
|
||||
type
|
||||
Ordinal*[T] {.magic: Ordinal.} ## Generic ordinal type. Includes integer,
|
||||
## bool, character, and enumeration types
|
||||
## as well as their subtypes. See also
|
||||
## `SomeOrdinal`.
|
||||
else:
|
||||
# bootstrap <= 0.20.0
|
||||
type
|
||||
OrdinalImpl[T] {.magic: Ordinal.}
|
||||
Ordinal* = OrdinalImpl | uint | uint64
|
||||
|
||||
when defined(nimHasRunnableExamples):
|
||||
proc runnableExamples*(body: untyped) {.magic: "RunnableExamples".}
|
||||
## A section you should use to mark `runnable example`:idx: code with.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue