-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuple type mismatch with proc() - Returns None #13849
Comments
Expected behaviour. |
Thanks for your answer :) 👍 I agree that those can be defined in System but let's look at this problem from a different angle.
Why it's None? I guess it could be much more informative if the error would be Hey, you are trying to redefine the proc name What do you think about that? |
Well, 1 is because Nim supports procedure overloading, so you can call both Although I agree that error message is really confusing |
Sorry, I was going to talk about the error message but I forgot, this isn't the first "type None" procvar error message issue, namely #6359 I would say is the same issue. I wouldn't close this for a duplicate though since #6359 doesn't really have a lot of examples but these issues are related and fixing both should be the focus. |
…ang#20932) * better procvar ambiguity errors, clean up after nim-lang#20457 fixes nim-lang#6359, fixes nim-lang#13849 * only trigger on closedsymchoice again * new approach * add manual entry for ambiguous enums too * add indent [skip ci] * move to proc
…ang#20932) * better procvar ambiguity errors, clean up after nim-lang#20457 fixes nim-lang#6359, fixes nim-lang#13849 * only trigger on closedsymchoice again * new approach * add manual entry for ambiguous enums too * add indent [skip ci] * move to proc
…ang#20932) * better procvar ambiguity errors, clean up after nim-lang#20457 fixes nim-lang#6359, fixes nim-lang#13849 * only trigger on closedsymchoice again * new approach * add manual entry for ambiguous enums too * add indent [skip ci] * move to proc
For some reason sending a proc() to a tuple returns None with specific proc names. By far I get None when naming procs as close() , dispose(), finished()
type mismatch: got <int, tuple of (proc (){.noSideEffect, gcsafe, locks: 0.}, None)>
Example
Current Output
Expected Output
It should compile
The text was updated successfully, but these errors were encountered: