Conversation
|
Side note: cxx is awesome and I can't thank you enough for setting it up. I'm just running into all the rough edges because I'm trying to push it really far. |
|
Added a simple smoke test, fixed the fallout. Ready for review. |
|
I'm happy with the state of this, pending review. I hope the semantics match what you want out of cxx, because this patch is very useful for the use case I'm pursuing currently. |
|
More testing found two edge cases I hadn't handled; handled those now. |
|
(why can't I unmark the PR as ready for review) So I added a test for I think that fixing that should wait for resolving #682, though, as that will majorly impact the handling of builtin types anyway. |
This closes #865.
This accidentally also allows arbitrarily nesting
OptionandPin. On emitting code, it's always normalized toOption<Pin<ref>>. I don't know how to avoid this. You could already arbitrarily nestPins (which would be normalized to onePin), though that seems less problematic than allowing someone to write e.g.Pin<Option<ref>>and getting outOption<Pin<ref>>.I don't know how to fix
Pin<Option<ref>>without also breakingPin<Pin<ref>>.Pin<Pin<ref>>is certainly bad practice and misleading, though, so perhaps breaking it is desirable.