Skip to content

Conversation

ikappaki
Copy link
Contributor

Hi,

could you please consider fix to fix na issue with (basilisp.core/is (= ...) not dispatching correctly when (= ..) is a seq. It fixes #829.

This issue manifests itself in macros where an the (= ..) in `(is (= ...)) form is expanded to a seq rather than a list, which should be treated accordingly by the = dispatch fn.

Thanks

@ikappaki ikappaki force-pushed the issue/test-is-=-macros-dispatch branch from b099837 to f8691e2 Compare January 23, 2024 07:32
(fn [expr _ _]
(cond
(list? expr) (first expr)
(and (sequential? expr) (not (vector? expr))) (symbol (name (first expr)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line made the assumption that (first expr) is always a symbol, which seemed dangerous to me. While investigating, I ended up fixing it and incorporating the fix into #831 (which also includes thrown-with-msg? assertion).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into it in detail!

@ikappaki
Copy link
Contributor Author

Improved fix by #831

@ikappaki ikappaki closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

basilisp.test\is does not produce correct cause when checking equality in macros

2 participants