Skip to content
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

Future compile-time error in dom.nim #107

Closed
telatin opened this issue May 13, 2022 · 3 comments
Closed

Future compile-time error in dom.nim #107

telatin opened this issue May 13, 2022 · 3 comments

Comments

@telatin
Copy link

telatin commented May 13, 2022

When using the last tag (v0.16) or the cloned repo, I get this warning with Nim 1.6.6

yaml/dom.nim(195, 3) 
Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]

Just reporting if you plan to update the code there,
thanks for the library!

@flyx
Copy link
Owner

flyx commented May 13, 2022

Frankly that warning has been around as long as this library. I won't believe this'll ever happen until it does.

I wouldn't know how to change the code to make this go away since the code does surely initialize result unless an exception is raised. Hence this warning is more a Nim bug than a NimYAML bug.

Thanks for reporting, but this is not something I plan to spend my time on. Leaving this open in case someone else wants to.

@telatin
Copy link
Author

telatin commented May 13, 2022

Good to know :) Thanks for the prompt reply!

@flyx
Copy link
Owner

flyx commented Aug 30, 2023

The warning lied to us. We are now in the Nim 2.0.0 future and instead of becoming a compile time error, the warning is gone :)

Closing the issue.

@flyx flyx closed this as completed Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants