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
Summary ------- Fix explicit or implicit creation of a closure leading to the C compiler errors when using strict(er) C compilers. Details ------- * when lowering the 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 proper typing for pointer assignments rightfully reported an error in this case
- Loading branch information