You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/dian/Projects/stuff/a.nim(7, 23) Error: internal error: '=' operator not found for type MemoryNode
Expected Output
No compilation error, but of course it'll crash at runtime because it's dereferencing a null pointer.
$ nim -v
Nim Compiler Version 1.3.7 [Linux: amd64]
Compiled at 2020-10-07
Copyright (c) 2006-2020 by Andreas Rumpf
git hash: acbe27b082c202895df1b78a82951389b4a232a0
active boot switches: -d:release -d:danger
The text was updated successfully, but these errors were encountered:
procfireRules*[T](session: varSession[T]) =# find all nodes with `then` blocks that need executedvar thenNodes: seq[ptrMemoryNode[T]]
for node in session.thenNodes[].items:
thenNodes.add(node)
if thenNodes.len ==0:
return
session.thenNodes[].clear
# collect all nodes/vars to be executedvar thenQueue: seq[(MemoryNode[T], Vars[T])]
for node in thenNodes:
node.trigger =falsefor match in node.matches.values:
if match.enabled:
thenQueue.add((node: node[], vars: match.vars)) # compiler fails on this line# execute `then` blocksfor (node, vars) in thenQueue:
node.callback(vars)
# recur because there may be new `then` blocks to execute
session.fireRules()
This fails to compile while it shouldn't. Found in https://github.com/paranim/pararules
Example
Current Output
Expected Output
No compilation error, but of course it'll crash at runtime because it's dereferencing a null pointer.
The text was updated successfully, but these errors were encountered: