summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-10-31 00:03:19 +0800
committerGitHub <noreply@github.com>2023-10-30 17:03:19 +0100
commitafa2f2ebf6bbceeae2846546afb78d316bca7d5f (patch)
treebdd0ce336b4bb42978823933d402e3cc1090308a /compiler
parent4d11d0619d11d8aecdaff998981efcd054de9760 (diff)
downloadNim-afa2f2ebf6bbceeae2846546afb78d316bca7d5f.tar.gz
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
Diffstat (limited to 'compiler')
-rw-r--r--compiler/nir/nirvm.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/nir/nirvm.nim b/compiler/nir/nirvm.nim
index 1f2f4e326..4b2c7e548 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])