parent
8407a57499
commit
afbcd1b330
34 changed files with 530 additions and 314 deletions
|
|
@ -186,7 +186,9 @@ proc semOrd(c: PContext, n: PNode): PNode =
|
|||
if isOrdinalType(parType, allowEnumWithHoles=true):
|
||||
discard
|
||||
elif parType.kind == tySet:
|
||||
result.typ = makeRangeType(c, firstOrd(c.config, parType), lastOrd(c.config, parType), n.info)
|
||||
let a = toInt64(firstOrd(c.config, parType))
|
||||
let b = toInt64(lastOrd(c.config, parType))
|
||||
result.typ = makeRangeType(c, a, b, n.info)
|
||||
else:
|
||||
localError(c.config, n.info, errOrdinalTypeExpected)
|
||||
result.typ = errorType(c)
|
||||
|
|
@ -273,7 +275,7 @@ proc semDynamicBindSym(c: PContext, n: PNode): PNode =
|
|||
# executed like 'normal' VM callback
|
||||
idx = vm.registerCallback("bindSymImpl", bindSymWrapper)
|
||||
# dummy node to carry idx information to VM
|
||||
idxNode = newIntTypeNode(nkIntLit, idx, c.graph.getSysType(TLineInfo(), tyInt))
|
||||
idxNode = newIntTypeNode(idx, c.graph.getSysType(TLineInfo(), tyInt))
|
||||
|
||||
result = copyNode(n)
|
||||
for x in n: result.add x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue