allow HSlice bounded by constants of distinct types (#19219) [backport:1.2]

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.
This commit is contained in:
Etan Kissling 2021-12-06 20:38:23 +01:00 • committed by GitHub
commit 0213c7313b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View file

@ -0,0 +1,2 @@
type Foo = distinct uint64
const slice = 0 ..< 42.Foo