fixes booting warnings (#21583)

This commit is contained in:
ringabout
2023-04-10 15:43:12 +08:00
committed by GitHub
parent 16bc546aea
commit 4d683fc689
4 changed files with 3 additions and 6 deletions

View File

@@ -803,8 +803,7 @@ proc semRecordNodeAux(c: PContext, n: PNode, check: var IntSet, pos: var int,
else: illFormedAst(n, c.config)
if c.inGenericContext > 0:
# use a new check intset here for each branch:
var newCheck: IntSet
assign(newCheck, check)
var newCheck: IntSet = check
var newPos = pos
var newf = newNodeI(nkRecList, n.info)
semRecordNodeAux(c, it[idx], newCheck, newPos, newf, rectype, hasCaseFields)

View File

@@ -9,11 +9,10 @@
## Computes hash values for routine (proc, method etc) signatures.
import ast, tables, ropes, md5, modulegraphs, options, msgs, packages, pathutils
import ast, tables, ropes, md5, modulegraphs, options, msgs, pathutils
from hashes import Hash
import types
import std/os
when defined(nimPreviewSlimSystem):
import std/assertions

View File

@@ -1686,7 +1686,7 @@ proc isTupleRecursive(t: PType, cycleDetector: var IntSet): bool =
of tyTuple:
var cycleDetectorCopy: IntSet
for i in 0..<t.len:
assign(cycleDetectorCopy, cycleDetector)
cycleDetectorCopy = cycleDetector
if isTupleRecursive(t[i], cycleDetectorCopy):
return true
of tyAlias, tyRef, tyPtr, tyGenericInst, tyVar, tyLent, tySink,

View File

@@ -38,7 +38,6 @@ when defined(nimPreviewSlimSystem):
else:
from std/formatfloat import addFloatRoundtrip, addFloatSprintf
from std/strutils import formatBiggestFloat, FloatFormatMode
# There are some useful procs in vmconv.
import vmconv, vmmarshal