Open tersec opened 2 days ago
!nim c
type U = object
h: bool
type K = object
case h: bool
of true, false: g: int
let x = default(U)
block:
let v = x.h
case v
of true, false: discard K(h: v, g: 0)
case x.h
of true, false: discard K(h: x.h, g: 0)
0 (0 bytes)
```cpp
```
2024-06-26T14:17:26
2024-06-26T14:17:26
0 (0 bytes)
```cpp
```
2024-06-26T14:17:27
2024-06-26T14:17:27
0 (0 bytes)
```cpp
```
2024-06-26T14:17:30
2024-06-26T14:17:30
0 (0 bytes)
```cpp
```
2024-06-26T14:17:33
2024-06-26T14:17:34
0 (0 bytes)
```cpp
```
2024-06-26T14:17:36
2024-06-26T14:17:37
0 (0 bytes)
```cpp
```
2024-06-26T14:17:39
2024-06-26T14:17:39
0 (0 bytes)
```cpp
```
2024-06-26T14:17:42
2024-06-26T14:17:42
0 (0 bytes)
```cpp
```
2024-06-26T14:17:45
2024-06-26T14:17:45
11.4.0
14.0.0
20.3
2024-06-26T14:10:59Z
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 22 minutes
bisecting 8
commits at 0
commits per second
The analysis of the variable version is special cased in the compiler
Why does it compile in either version ... It shouldn't.
Description
With the
let v = x.h
helper, it does figure out that theK
case object can be constructed, but not when directly accessing both asx.h
.Nim Version
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response