Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix C codegen regression with closures (#1392)
## Summary Fix explicit or implicit creation of a closure leading to C compiler errors when using strict(er) C compilers. ## Details * when lowering closure types, use a `tkProc` type with `ccClosure` calling convention * using a `ccNimCall` type with an additional `void` parameter meant that `cgen` placed the result type (in case of RVO) *after* the environment type, which is incorrect and doesn't match the signature of closure procedures * C compilers that require compatible types when implicitly casting rightfully reported an error in this case
- Loading branch information