Skip to content

inconsistent status of "not nil" in docs vs. compiler #13861

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

Closed
akavel opened this issue Apr 3, 2020 · 1 comment
Closed

inconsistent status of "not nil" in docs vs. compiler #13861

akavel opened this issue Apr 3, 2020 · 1 comment
Labels
Documentation Related to documentation content (not generation).

Comments

@akavel
Copy link

akavel commented Apr 3, 2020

The main Nim Manual mentions not nil as a regular feature, not in the "experimental features" appendix, and with no mention of pragma, but the compiler complains that it wants a pragma:

Example

type Foo = ref int not nil

Current Output

Error: enable the 'not nil' annotation with {.experimental: "notnil".}

Expected Output

Expected to compile just fine without "experimental" pragma.

Possible Solution

If "not nil" is still experimental, I'd expect its section to be moved from the main Nim Manual to the "experimental features" appendix (https://nim-lang.org/docs/manual_experimental.html)

$ nim -v
Nim Compiler Version 1.2.0 [Windows: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff
active boot switches: -d:release
@ghost ghost added the `not nil` Checking label Jul 26, 2020
@ghost
Copy link

ghost commented Jul 26, 2020

Fixed by #14027

@ghost ghost closed this as completed Jul 26, 2020
@ghost ghost added Documentation Related to documentation content (not generation). and removed `not nil` Checking labels Jul 26, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to documentation content (not generation).
Projects
None yet
Development

No branches or pull requests

1 participant