move prelude so that include std/prelude also works (#17110)
* move prelude so that `include std/prelude` also works * add test
This commit is contained in:
parent
bd199a8d31
commit
e94a3e5fcd
7 changed files with 28 additions and 11 deletions
14
tests/stdlib/tprelude.nim
Normal file
14
tests/stdlib/tprelude.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
targets: "c js"
|
||||
matrix: "; -d:nimTestTpreludeCase1"
|
||||
"""
|
||||
|
||||
when defined nimTestTpreludeCase1:
|
||||
include std/prelude
|
||||
else:
|
||||
include prelude
|
||||
|
||||
template main() =
|
||||
doAssert toSeq(1..3) == @[1,2,3]
|
||||
static: main()
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue