mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 08:43:58 +00:00
restore the T1-T9 types and clarify how generic concepts work
This commit is contained in:
@@ -98,6 +98,17 @@ type
|
||||
SomeNumber* = SomeInteger|SomeReal
|
||||
## type class matching all number types
|
||||
|
||||
T1* = auto
|
||||
T2* = auto
|
||||
T3* = auto
|
||||
T4* = auto
|
||||
T5* = auto
|
||||
T6* = auto
|
||||
T7* = auto
|
||||
T8* = auto
|
||||
T9* = auto
|
||||
## Helper types for writing implicitly generic procs
|
||||
|
||||
proc defined*(x: untyped): bool {.magic: "Defined", noSideEffect, compileTime.}
|
||||
## Special compile-time procedure that checks whether `x` is
|
||||
## defined.
|
||||
|
||||
Reference in New Issue
Block a user