Pick the and symbol we need explicitly (#8249)
Using getSysSym made the compiler pick a random `and` symbol: if the symbol table is shuffled we may end up selecting one of the wrong overloads. Fixes #8246
This commit is contained in:
parent
befca425c4
commit
03c8fdc6cb
1 changed files with 2 additions and 2 deletions
|
|
@ -231,8 +231,8 @@ proc genDispatcher(g: ModuleGraph; methods: TSymSeq, relevantCols: IntSet): PSym
|
||||||
var paramLen = sonsLen(base.typ)
|
var paramLen = sonsLen(base.typ)
|
||||||
var nilchecks = newNodeI(nkStmtList, base.info)
|
var nilchecks = newNodeI(nkStmtList, base.info)
|
||||||
var disp = newNodeI(nkIfStmt, base.info)
|
var disp = newNodeI(nkIfStmt, base.info)
|
||||||
var ands = getSysSym(g, unknownLineInfo(), "and")
|
var ands = getSysMagic(g, unknownLineInfo(), "and", mAnd)
|
||||||
var iss = getSysSym(g, unknownLineInfo(), "of")
|
var iss = getSysMagic(g, unknownLineInfo(), "of", mOf)
|
||||||
let boolType = getSysType(g, unknownLineInfo(), tyBool)
|
let boolType = getSysType(g, unknownLineInfo(), tyBool)
|
||||||
for col in countup(1, paramLen - 1):
|
for col in countup(1, paramLen - 1):
|
||||||
if contains(relevantCols, col):
|
if contains(relevantCols, col):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue