fixes niminst with stricteffects; add testcase for niminst (#20587)
fixes niminst with stricteffects; add testcase
This commit is contained in:
parent
81087c949f
commit
15dff4daff
3 changed files with 17 additions and 1 deletions
5
tests/tools/compile/tniminst.nim
Normal file
5
tests/tools/compile/tniminst.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
discard """
|
||||||
|
action: compile
|
||||||
|
"""
|
||||||
|
|
||||||
|
include tools/niminst/niminst
|
||||||
|
|
@ -9,6 +9,10 @@
|
||||||
|
|
||||||
import osproc, times, os, strutils
|
import osproc, times, os, strutils
|
||||||
|
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/[assertions, syncio]
|
||||||
|
|
||||||
# http://www.debian.org/doc/manuals/maint-guide/
|
# http://www.debian.org/doc/manuals/maint-guide/
|
||||||
|
|
||||||
# Required files for debhelper.
|
# Required files for debhelper.
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,13 @@ import
|
||||||
os, strutils, parseopt, parsecfg, strtabs, streams, debcreation,
|
os, strutils, parseopt, parsecfg, strtabs, streams, debcreation,
|
||||||
std / sha1
|
std / sha1
|
||||||
|
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
|
when not defined(nimHasEffectsOf):
|
||||||
|
{.pragma: effectsOf.}
|
||||||
|
|
||||||
const
|
const
|
||||||
maxOS = 20 # max number of OSes
|
maxOS = 20 # max number of OSes
|
||||||
maxCPU = 20 # max number of CPUs
|
maxCPU = 20 # max number of CPUs
|
||||||
|
|
@ -198,7 +205,7 @@ proc parseCmdLine(c: var ConfigData) =
|
||||||
if c.infile.len == 0: quit(Usage)
|
if c.infile.len == 0: quit(Usage)
|
||||||
if c.mainfile.len == 0: c.mainfile = changeFileExt(c.infile, "nim")
|
if c.mainfile.len == 0: c.mainfile = changeFileExt(c.infile, "nim")
|
||||||
|
|
||||||
proc eqT(a, b: string; t: proc (a: char): char{.nimcall.}): bool =
|
proc eqT(a, b: string; t: proc (a: char): char {.nimcall.}): bool {.effectsOf: t.} =
|
||||||
## equality under a transformation ``t``. candidate for the stdlib?
|
## equality under a transformation ``t``. candidate for the stdlib?
|
||||||
var i = 0
|
var i = 0
|
||||||
var j = 0
|
var j = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue