-
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
Support qualified variant selectors with matching? #83
Comments
It would be possible to implement, and I think it should be supported. Most likely this is an implementation oversight on my side. |
Araq
pushed a commit
that referenced
this issue
Jun 3, 2021
…efault>` implementation (#77) * [TEST] * [TEST] More tests * [FIX] #76 * [TEST] String length test * [DOC] Spec for `opt` * [DOC] `doc` interaction with `any` * [DOC] Scale back `opt` features * [CHECKPOINT] Initial `opt` implementation * [FEATURE] `opt` implementation - ADDED :: - implement `opt` for field access * [FIX] Additional check for `nil` values - 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. * [CLEAN] Internal naming cleanup - CHANGED :: - Use more readable, unabreviated field names (cnt -> foundCount, fldElems -> fieldElements) * [FIX] make style check shut the fuck up * [FIX] Also bitch with error on typos * [FIX] oh no, stdlib does not pass style check 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. * [DOC] * [FIX] Support qualified variant selectors with matching? #83 * [CLEAN] debug prints * [TEST] Decision matrix predicate test * [DOC] Predicates and infix operators * [FIX] Use peg instead of regex for example test * [FIX] Duplicate assign for matches with conditions * [CHECKPOINT]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following fails:
with:
If I remove the variant qualification it works:
I have variant kinds with name clashes so being able to fully qualify the enum selector would be useful.
The text was updated successfully, but these errors were encountered: