Last active
December 31, 2015 13:59
-
-
Save KoFish/7996768 to your computer and use it in GitHub Desktop.
Strange nimrod type resolution error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type tb_cell = distinct int | |
| proc tb_put_cell(x: cuint; y: cuint; cell: ptr tb_cell) = | |
| echo "Hey" | |
| proc put_cell*(x, y: cuint; cell: var tb_cell) = | |
| tb_put_cell(x, y, cell.addr) | |
| # In application | |
| proc put*(cell: var tb_cell; x, y: int): | |
| put_cell(x.cuint, y.cuint, cell) | |
| # kofish.nim(12, 13) Error: type mismatch: got (cuint, cuint, tb_cell) | |
| # but expected one of: | |
| # kofish.tb_put_cell(x: cuint, y: cuint, cell: ptr tb_cell) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment