Closed SirNickolas closed 1 year ago
!nim c
import std/options
var it = iterator: int = discard
assert it.option.isSome # Passes.
it = nil
assert it.option.isNone
99.01 Kb (101,384 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:44
2023-11-14T01:35:44
96.64 Kb (98,960 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:45
2023-11-14T01:35:45
96.64 Kb (98,960 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:46
2023-11-14T01:35:46
105.23 Kb (107,760 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:49
2023-11-14T01:35:50
97.05 Kb (99,384 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:52
2023-11-14T01:35:52
97.10 Kb (99,432 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:55
2023-11-14T01:35:55
92.53 Kb (94,752 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2023-11-14T01:35:57
2023-11-14T01:35:57
2023-04-11 10:23:41 +0300
on commit #1bb117cd7 with message:
```
`proc` typeclass accounts for `iterator`, call conventions + `nil` fix + document typeclass AST (#21629)
* test fix #16546 #16548 + another issue
* please don't tell me other packages do this
* fix CI + test typeclass callconv pragma
* better logic in parser
* docs and changelog
```
The bug is in the files:
```
changelogs/changelog_2_0_0.md
compiler/parser.nim
compiler/semexprs.nim
compiler/semtypes.nim
compiler/sigmatch.nim
compiler/typesrenderer.nim
doc/astspec.txt
doc/manual.md
lib/pure/hashes.nim
lib/system.nim
tests/typerel/tproctypeclass.nim
tests/typerel/ttynilinstantiation.nim
```
The bug can be in the commits:
(Diagnostics sometimes off-by-one).11.4.0
14.0.0
18.2
2023-11-14T01:35:13Z
1
nim c --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
:robot: Bug found in 31 minutes
bisecting 1923
commits at 61
commits per second
Description
https://github.com/nim-lang/Nim/blob/4d11d0619d11d8aecdaff998981efcd054de9760/lib/pure/options.nim#L83-L88
We see
proc
here but notiterator
. I’m suspicious about such asymmetry.Nim Version
Nim Compiler Version 2.0.0 [Linux: amd64] Compiled at 2023-08-01 Copyright (c) 2006-2023 by Andreas Rumpf
git hash: a488067a4130f029000be4550a0fb1b39e0e9e7c active boot switches: -d:release
Current Output
Expected Output
No response
Possible Solution
Append
| iterator
to the definition ofSomePointer
.Additional Information
No response