got rid of 'accept' dir in the tests
This commit is contained in:
parent
d0772feb08
commit
a274f3bf5b
264 changed files with 5 additions and 7 deletions
|
|
@ -1,33 +0,0 @@
|
|||
discard """
|
||||
output: "he, no return type;abc a string"
|
||||
"""
|
||||
|
||||
proc ReturnT[T](x: T): T =
|
||||
when T is void:
|
||||
echo "he, no return type;"
|
||||
else:
|
||||
result = x & " a string"
|
||||
|
||||
proc nothing(x, y: void): void =
|
||||
echo "ha"
|
||||
|
||||
proc callProc[T](p: proc (x: T), x: T) =
|
||||
when T is void:
|
||||
p()
|
||||
else:
|
||||
p(x)
|
||||
|
||||
proc intProc(x: int) =
|
||||
echo x
|
||||
|
||||
proc emptyProc() =
|
||||
echo "empty"
|
||||
|
||||
callProc[int](intProc, 12)
|
||||
callProc[void](emptyProc)
|
||||
|
||||
|
||||
ReturnT[void]()
|
||||
echo ReturnT[string]("abc")
|
||||
nothing()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue