-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #76, #82, #83, update docs, more constistent opt <pattern> or <default>
implementation
#77
Conversation
The relevant issue is nim-lang/Nim#17199 by the way so this is a workaround I guess? |
might not be needed if nim-lang/Nim#17348 works and will be merged |
Reverting this is a simple find-replace for |
- ADDED :: - implement `opt` for field access
- CHANGED :: Before calling check function on nested match element check using `isNil` if entry can is correct. This avoids almost unfixable nil-based exceptions triggered deeply within pattern.
- CHANGED :: - Use more readable, unabreviated field names (cnt -> foundCount, fldElems -> fieldElements)
Compiling /home/runner/work/fusion/fusion/fusion/tests/tmatching (from package fusion) using c backend Error: /home/runner/work/fusion/fusion/nim/lib/std/private/underscored_calls.nim(43, 21) Error: 'nnkArgList' should be: 'nnkArglist' Tip: 5 messages have been suppressed, use --verbose to show them.
Fix #83 |
opt <pattern> or <default>
implementation
opt <pattern> or <default>
implementationopt <pattern> or <default>
implementation
CI failure unrelated to |
CI failure unrelated - all the failures happened on "install dependencies" stage. |
Enabling
--gc:{orc,arc}
caused macro to behave differently, by somehow mutating immutable access path passed to the match expression generator. I wasn't able to reliably reproduce the bug, but it wasn't related to implementation itself.Fixed that by explicitly copying path each time it is passed around - usually it is a sequence of 3-4 access elements, and copying only happens during macro evaluation.
Related: #76