-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
- [4,5,6] returns the last element (6), as it should.
- [_,5,6] <: +4 sets the first item to 4 and returns 6. It should
- [4,5,6] <: +4 also works correctly.
- [4,5,6] <: +3 notes that there is a contradiction. 4!=3. This causes it to assume that the 3 may be a null match and it creates an "alt" to represent that. This eventually results in a segfault.
I'm currently leaving the segfault because I haven't figured out the best way to handle this.
An even shorter example is:
+3 = +4
which prints "CONTRADICTION!" then segfaults. We need a better plan for what to do with contradictions.
The problem is that contradictions also signal the end of a list. e.g., the end of a repeated pattern match.
So it must detect the difference. (Which is the essence of this issue; what is the best way to detect the situation and what is to be done.)
Metadata
Metadata
Assignees
Labels
No labels