I have a weird compilation bug, here is the minimal snipped I've been able to produce:
import std/[tables, deques]
block:
var x: Deque[proc() {.gcsafe.}]
while x.len > 0:
discard x.popFirst()
block:
type Fun = proc() {.gcsafe, raises: [].}
var
x: Table[int, Fun]
y: Fun
discard x.pop(0, y)
The error is
.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(557, 15) Error: type mismatch: got 'proc (){.closure, gcsafe.}' for 'move(t.data[index].val)' but expected 'Fun = proc (){.closure, gcsafe.}'
.raise effects differ
Getting the same error for both stable and devel. The error goes away if
Don't even know how to name the issue on github :)