move since from inclrtl to std/private/since (#14188)
* move since from inclrtl to std/private/since * move since import in system below for HCR
This commit is contained in:
parent
3be669be32
commit
fbc97e712a
27 changed files with 60 additions and 59 deletions
|
|
@ -1,32 +0,0 @@
|
|||
include system/inclrtl
|
||||
|
||||
proc fun1(): int {.since: (1,3).} = 12
|
||||
proc fun1Bad(): int {.since: (99,3).} = 12
|
||||
proc fun2(): int {.since: (1,3,1).} = 12
|
||||
proc fun2Bad(): int {.since: (99,3,1).} = 12
|
||||
|
||||
doAssert fun1() == 12
|
||||
doAssert declared(fun1)
|
||||
doAssert not declared(fun1Bad)
|
||||
|
||||
doAssert fun2() == 12
|
||||
doAssert declared(fun2)
|
||||
doAssert not declared(fun2Bad)
|
||||
|
||||
var ok = false
|
||||
since (1, 3):
|
||||
ok = true
|
||||
doAssert ok
|
||||
|
||||
ok = false
|
||||
since (1, 3, 1):
|
||||
ok = true
|
||||
doAssert ok
|
||||
|
||||
since (99,3):
|
||||
doAssert false
|
||||
|
||||
when false:
|
||||
# pending https://github.com/timotheecour/Nim/issues/129
|
||||
# Error: cannot attach a custom pragma to 'fun3'
|
||||
template fun3(): int {.since: (1, 3).} = 12
|
||||
Loading…
Add table
Add a link
Reference in a new issue