From afa2f2ebf6bbceeae2846546afb78d316bca7d5f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:03:19 +0800 Subject: [PATCH] fixes nightlies; fixes incompatible types with csource_v2 (#22889) ref https://github.com/nim-lang/nightlies/actions/runs/6686795512/job/18166625042#logs > /home/runner/work/nightlies/nightlies/nim/compiler/nir/nirvm.nim(163, 35) Error: type mismatch: got 'BiggestInt' for 'b.m.lit.numbers[litId(b.m.types.nodes[int(y)])]' but expected 'int' Or unifies the type in one way or another --- compiler/nir/nirvm.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/nir/nirvm.nim b/compiler/nir/nirvm.nim index 1f2f4e326c..4b2c7e548b 100644 --- a/compiler/nir/nirvm.nim +++ b/compiler/nir/nirvm.nim @@ -160,13 +160,13 @@ proc traverseObject(b: var Bytecode; t, offsetKey: TypeId) = var offset = -1 for y in sons(b.m.types, x): if b.m.types[y].kind == OffsetVal: - offset = b.m.lit.numbers[b.m.types[y].litId] + offset = int(b.m.lit.numbers[b.m.types[y].litId]) break b.offsets.mgetOrPut(offsetKey, @[]).add (offset, x.firstSon) of SizeVal: - size = b.m.lit.numbers[b.m.types[x].litId] + size = int(b.m.lit.numbers[b.m.types[x].litId]) of AlignVal: - align = b.m.lit.numbers[b.m.types[x].litId] + align = int(b.m.lit.numbers[b.m.types[x].litId]) of ObjectTy: # inheritance let impl = b.typeImpls.getOrDefault(b.m.lit.strings[b.m.types[x].litId])