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
This gives me compile-time errors from gcc. Two questions:
Is this code invalid?
And even if this code is invalid, shouldn't the Nim compiler complain, rather than generating C code that gcc rejects?
type
F = proc()
T = tuple[c: F]
const
f: F = proc() = echo "Got into the function."
myTuple: T = (c: f)
myLiteralArray: array[1, T] = [myTuple]
myLiteralArray[0].c()
Nim Version
Nim Compiler Version 1.7.3 [Linux: amd64]
Compiled at 2022-10-10
Copyright (c) 2006-2022 by Andreas Rumpf
git hash: 1f20750
active boot switches: -d:release