Browse Source
In multi-terms, all matching rules fire. We treat the result as an unordered set of values, so setting rule priorities is meaningless. We want to prohibit relying on the rule match order in this case. Also, codegen can produce invalid Rust if rules with different priorities both match against a multi-term. We first documented this symptom in #5647. As far as I can figure, prohibiting rule priorities prevents all possible instances of that bug. At some point in the future we might decide we want to carefully define semantics for multi-term result ordering, at which point we can revisit this.pull/5647/head
Jamey Sharp
2 years ago
committed by
GitHub
4 changed files with 24 additions and 4 deletions
@ -0,0 +1,4 @@ |
|||
(type u32 (primitive u32)) |
|||
|
|||
(decl multi A (u32) u32) |
|||
(rule 0 (A x) x) |
Loading…
Reference in new issue