-
-
Save ReneSac/8c2a4f992baede3e03ca to your computer and use it in GitHub Desktop.
Error: got (seq[typedesc[int]]) but expected 'seq[int]
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
| proc works(s: seq[int], max:int) : seq[int] = | |
| result = newseq[int](max) | |
| proc fails(s: seq, max:int) : seq[int] = | |
| result = newseq[int](max) | |
| let s = newseq[int](1) | |
| let x = works(s, 1) | |
| let y = fails(s, 1) | |
| #error.nim(9, 13) Info: instantiation from here | |
| #error.nim(5, 22) Error: type mismatch: got (seq[typedesc[int]]) but expected 'seq[int]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment