Open tcbrindle opened 4 months ago
Removing the extension and instead using ReversedCollection
directly in the for loop, i.e. changing the last line to
for let i in ReversedCollection(base: array) { print(i) }
results in a similar crash in a different source file:
begin depolymorphization pass.
IR/Module+Depolymorphize.swift:292: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Illegal instruction: 4
I think the first issue (the crash in the type checker) is due to the current algorithm for constructing generic environment, which is being replaced by a more principled approach in #1482.
The second issue is caused by a bug during monomorphization that I should investigate.
The first issue has been fixed. The second issue is caused by the for loop and I suspect it is related to https://github.com/hylo-lang/hylo/issues/1510.
Attempting to compile the following Hylo source:
results in an assertion failure: