until condition quotation allows wrong return type #234
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq#234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
untilcombinator does not properly verify that its condition quotation returns aBool. A quotation like[1]that returns anIntshould be rejected at compile time, but currently passes type checking.Expected Behavior
Should produce a compile-time error like:
Actual Behavior
The code compiles without error.
Root Cause
The row variable unification absorbs the
Intinstead of checking it matches the expectedBool. The signature( ..a Q -- ..b )with independent row variables allows the condition's actual effect to be ignored.Related
test_until_cond_return_type_gapin typechecker.rs documents this gapwhilecondition checkinghttps://github.com/navicore/patch-seq/pull/236