diff --git a/compiler/nim.cfg b/compiler/nim.cfg index 5e8471f7052a..853a657b391e 100644 --- a/compiler/nim.cfg +++ b/compiler/nim.cfg @@ -6,7 +6,6 @@ define:booting define:nimcore define:nimPreviewFloatRoundtrip define:nimPreviewSlimSystem -gc:refc #import:"$projectpath/testability" diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index faf8e3baa8b1..1b98f5c1a836 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -225,7 +225,7 @@ proc semTry(c: PContext, n: PNode; flags: TExprFlags; expectedType: PType = nil) if a.len == 2 and a[0].kind == nkBracket: # rewrite ``except [a, b, c]: body`` -> ```except a, b, c: body``` - a.sons[0..0] = a[0].sons + a.sons[0..0] = move a[0].sons if a.len == 2 and a[0].isInfixAs(): # support ``except Exception as ex: body`` diff --git a/koch.nim b/koch.nim index 1e531e5a95f5..b0718dadce14 100644 --- a/koch.nim +++ b/koch.nim @@ -537,7 +537,8 @@ proc runCI(cmd: string) = # boot without -d:nimHasLibFFI to make sure this still works # `--lib:lib` is needed for bootstrap on openbsd, for reasons described in # https://github.com/nim-lang/Nim/pull/14291 (`getAppFilename` bugsfor older nim on openbsd). - kochExecFold("Boot in release mode", "boot -d:release -d:nimStrictMode --lib:lib") + kochExecFold("Boot in release mode", "boot -d:release --gc:refc -d:nimStrictMode --lib:lib") + kochExecFold("Boot Nim ORC", "boot -d:release --lib:lib") when false: # debugging: when you need to run only 1 test in CI, use something like this: execFold("debugging test", "nim r tests/stdlib/tosproc.nim") @@ -591,10 +592,6 @@ proc runCI(cmd: string) = execFold("Run atlas tests", "nim c -r -d:atlasTests tools/atlas/atlas.nim clone https://github.com/disruptek/balls") - when not defined(bsd): - # the BSDs are overwhelmed already, so only run this test on the other machines: - kochExecFold("Boot Nim ORC", "boot -d:release --mm:orc --lib:lib") - proc testUnixInstall(cmdLineRest: string) = csource("-d:danger" & cmdLineRest) xz(false, cmdLineRest) diff --git a/lib/system.nim b/lib/system.nim index 2de70ecadf0c..daee96c1c5ca 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1211,10 +1211,10 @@ else: when defined(nimSeqsV2): - template movingCopy(a, b) = + template movingCopy(a, b: typed) = a = move(b) else: - template movingCopy(a, b) = + template movingCopy(a, b: typed) = shallowCopy(a, b) proc del*[T](x: var seq[T], i: Natural) {.noSideEffect.} = diff --git a/lib/system/indices.nim b/lib/system/indices.nim index 40e7419f6aef..3f90d43993ab 100644 --- a/lib/system/indices.nim +++ b/lib/system/indices.nim @@ -55,7 +55,7 @@ template `[]=`*(s: string; i: int; val: char) = arrPut(s, i, val) template `^^`(s, i: untyped): untyped = (when i is BackwardsIndex: s.len - int(i) else: int(i)) -template spliceImpl(s, a, L, b: untyped): untyped = +template spliceImpl(s, a, L, b: typed): untyped = # make room for additional elements or cut: var shift = b.len - max(0,L) # ignore negative slice size var newLen = s.len + shift @@ -147,7 +147,6 @@ proc `[]=`*[T; U, V: Ordinal](s: var seq[T], x: HSlice[U, V], b: openArray[T]) = var s = @"abcdefgh" s[1 .. ^2] = @"xyz" assert s == @"axyzh" - let a = s ^^ x.a let L = (s ^^ x.b) - a + 1 if L == b.len: