Closed asoffer closed 2 years ago
Reopening this one because your recent commit introduced a related issue:
foo := [-1, -1]
results in the following error:
[140536296625992 ir/builder.cc:214 ApplyImplicitCasts] Unreachable code-path.
([2; integer], casting implicitly to, []([2; i64]))
*** SIGABRT received at time=1640831202 on cpu 0 ***
PC: @ 0x7fd12813c808 (unknown) pthread_kill
@ 0x18fd5f0 64 absl::WriteFailureInfo()
@ 0x18fd2d4 224 absl::AbslFailureSignalHandler()
@ 0x7fd1280e8520 (unknown) (unknown)
Aborted (core dumped)
And if you try to provide an array type:
foo: [2; i64] = [-1, -1]
it yields the error: No viable cast from `[2; integer]` to `[2; i64]`.
Reproducer:
A workaround is to explicitly construct the slice, in this case,
slice(&a[0], a:?.length)