-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix splitV when splitting empty sequence to type [inf][0]
Previously, `splitV` would assume that if you were splitting a value `val` into something of type `[inf][each]`, then `val` must be a stream of type of `[inf * each]` (i.e., of type `[inf]`). This is not true in the corner case where `each` equals `0`, however. In that case, `val` is of type `[0]`, which is a word, not a stream. As such, we need to ensure that we do not call `fromSeq` on `val`, which crashes if `val` is not a stream or sequence. Fixes #1749.
- Loading branch information
1 parent
36726ee
commit c898bb7
Showing
5 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
f : [0] -> [inf][0] | ||
f = split | ||
|
||
main : [0] | ||
main = (f []) @ 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
:load issue1749.cry | ||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading module Main | ||
0x0 |