parent
6cb3635ca0
commit
e23857a98b
4 changed files with 48 additions and 3 deletions
20
tests/distinct/tdistinct_consts.nim
Normal file
20
tests/distinct/tdistinct_consts.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
# bug #2641
|
||||
|
||||
type MyChar = distinct char
|
||||
const c:MyChar = MyChar('a')
|
||||
|
||||
type MyBool = distinct bool
|
||||
const b:MyBool = MyBool(true)
|
||||
|
||||
type MyBoolSet = distinct set[bool]
|
||||
const bs:MyBoolSet = MyBoolSet({true})
|
||||
|
||||
type MyCharSet= distinct set[char]
|
||||
const cs:MyCharSet = MyCharSet({'a'})
|
||||
|
||||
type MyBoolSeq = distinct seq[bool]
|
||||
const bseq:MyBoolSeq = MyBoolSeq(@[true, false])
|
||||
|
||||
type MyBoolArr = distinct array[3, bool]
|
||||
const barr:MyBoolArr = MyBoolArr([true, false, true])
|
||||
14
tests/template/tdefault_nil.nim
Normal file
14
tests/template/tdefault_nil.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
# bug #2629
|
||||
import sequtils, os
|
||||
|
||||
template glob_rst(basedir: string = nil): expr =
|
||||
if baseDir.isNil:
|
||||
to_seq(walk_files("*.rst"))
|
||||
else:
|
||||
to_seq(walk_files(basedir/"*.rst"))
|
||||
|
||||
let
|
||||
rst_files = concat(glob_rst(), glob_rst("docs"))
|
||||
|
||||
when isMainModule: echo rst_files
|
||||
Loading…
Add table
Add a link
Reference in a new issue