Commit 8e695a5
committed
allow
When creating heterogenous slices of distinct types, the compiler does
not initialize the internal type's `size` before accessing it.
This then leads to this crash message:
```
compiler/int128.nim(594, 11) `false` masking only implemented for 1, 2, 4 and 8 bytes [AssertionError]
```
This patch initializes the `size` properly, fixing the problem.HSlice bounded by constants of distinct types1 parent faacd63 commit 8e695a5
File tree
3 files changed
+10
-2
lines changed- compiler
- tests/slice
3 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| 256 | + | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| 265 | + | |
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
265 | 270 | | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments