Open kaidaniel opened 1 month ago
Hey @kaidaniel, thank you for finding the bug. Since you have the solution, do you want to create a PR to fix this? You can also add your example to a test.
If you intend to do that, a small suggestion is to incorporate the two if
statements into the pattern matching here.
Hi @yuxuanchen1997 - yes I'll go ahead and raise the PR :)
The "bottom" element of a Lattice is the identity element of the "join" operation. The "top" element of a Lattice is the identity element of the "meet" operation.
But when using the
#[derive(DisjointUnion)]
macro, I can create elements for whichx.clone().join(bottom) != x
andx.clone().meet(top) != x
.Reproducible Example
These tests should pass:
but they fail with the following error message:
Solution
replace https://github.com/facebook/SPARTA/blob/bd758a81954dc2c8fe75c8b32ab42d327fc4d895/rust-proc-macros/src/lib.rs#L87-L99 with