mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
* Fixes #11078 * Move to existing runnableExamples, update the expected html. * Remove second comment token.
33 lines
504 B
Nim
33 lines
504 B
Nim
|
|
import subdir / subdir_b / utils
|
|
|
|
## This is the top level module.
|
|
runnableExamples:
|
|
import subdir / subdir_b / utils
|
|
doAssert bar(3, 4) == 7
|
|
foo(enumValueA, enumValueB)
|
|
# bug #11078
|
|
for x in "xx": discard
|
|
|
|
|
|
template foo*(a, b: SomeType) =
|
|
## This does nothing
|
|
##
|
|
discard
|
|
|
|
proc bar*[T](a, b: T): T =
|
|
result = a + b
|
|
|
|
import std/macros
|
|
|
|
macro bar*(): untyped =
|
|
result = newStmtList()
|
|
|
|
var aVariable*: array[1,int]
|
|
|
|
aEnum()
|
|
bEnum()
|
|
|
|
# bug #9432
|
|
proc isValid*[T](x: T): bool = x.len > 0
|