mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
fixes niminst with stricteffects; add testcase for niminst (#20587)
fixes niminst with stricteffects; add testcase
This commit is contained in:
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
|
||||
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions, syncio]
|
||||
|
||||
# http://www.debian.org/doc/manuals/maint-guide/
|
||||
|
||||
# Required files for debhelper.
|
||||
|
||||
@@ -11,6 +11,13 @@ import
|
||||
os, strutils, parseopt, parsecfg, strtabs, streams, debcreation,
|
||||
std / sha1
|
||||
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/syncio
|
||||
|
||||
when not defined(nimHasEffectsOf):
|
||||
{.pragma: effectsOf.}
|
||||
|
||||
const
|
||||
maxOS = 20 # max number of OSes
|
||||
maxCPU = 20 # max number of CPUs
|
||||
@@ -198,7 +205,7 @@ proc parseCmdLine(c: var ConfigData) =
|
||||
if c.infile.len == 0: quit(Usage)
|
||||
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?
|
||||
var i = 0
|
||||
var j = 0
|
||||
|
||||
Reference in New Issue
Block a user