Summary
match from matchable doesn't handle keywords properly
Metadata
- Id: 0174f3bce4044fdbaf2cb422f68c76bd7217e1e3
- Trac id: 1333
- Type: defect
- Reporter: xificurC
- Owner: ashinn
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty: easy
- Resolution: fixed
- Priority: major
- Milestone: someday
- Version: 4.11.0
- Changetime: 2016-10-05 16:21:49 UTC
- Created: 2016-10-04 21:29:13 UTC
- Keywords: match matchable
Description
`(match '(#:key 1) x) x)` matches and returns `1`, whereas I would expect keywords to be self evaluating and therefore throw a match error.
And this throws a match error, not sure why: `(match '(#:key #:key) #:foo) "here")`. Again the expected behavior would be a match error.
As a last example: `(match '(#:key) 1 2)` should return `2` but returns `1`.
Changes and comments
[2016-10-04 21:32:27 UTC] xificurC wrote:
For the second example - I meant to say I think it should throw a match error but with the current behavior in place I don't understand why it doesn't match.