-
-
Save niv/d6807322d4296ccc4cde3d9758771280 to your computer and use it in GitHub Desktop.
This file contains 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
nwmaster.nim → master • cat test.nim | |
proc whatever[T](cb: proc(): T): T = | |
cb() | |
discard whatever() do -> int: discard | |
whatever() do -> void: discard | |
nwmaster.nim → master • nim c -r test | |
Hint: used config file '/Users/niv/.choosenim/toolchains/nim-0.18.0/config/nim.cfg' [Conf] | |
Hint: used config file '/Users/niv/code/nwmaster.nim/nim.cfg' [Conf] | |
Hint: system [Processing] | |
Hint: test [Processing] | |
test.nim(5, 9) Error: type mismatch: got <proc (){.noSideEffect, gcsafe, locks: 0.}> | |
but expected one of: | |
proc whatever[T](cb: proc (): T): T | |
expression: whatever(do -> void: | |
discard ) | |
[1] 45689 exit 1 nim c -r test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment