-
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
matching
bug with {orc,arc}
#76
Comments
The problem appears to be here: https://github.com/nim-lang/fusion/blob/master/src/fusion/matching.nim#L1495 If you print the |
It seems like macro implementation behaves differently based on |
Yeah it seems the existing tests fail with
Works fine without. |
You're right, it looks like a Nim VM bug: nim-lang/Nim#17294 |
nim-lang/Nim#17348 fixes the issue. |
@deech this needs a test case in fusion even though the underlying bug was fixed in stdlib; can you make a PR? |
@haxscramper has already written tests for it: https://github.com/nim-lang/fusion/pull/77/files?file-filters%5B%5D=.nim#diff-33abcca7f03798f7fd369f34051711499dee90cea8d05859cd933d31ce115f09R46. It includes the example case I posted, once the changes to |
…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]
The following matching example:
produces the error:
but only when compiled with
gc:orc
orgc:arc
.Nim version:
The text was updated successfully, but these errors were encountered: