Created
December 16, 2013 23:32
-
-
Save gradha/7996913 to your computer and use it in GitHub Desktop.
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): | |
| tb_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