-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
component:basilisp.coreIssue pertaining to basilisp.core namespaceIssue pertaining to basilisp.core namespaceissue-type:bugSomething isn't workingSomething isn't working
Description
There are a few different issues with Basilisp's implementation of condp:
- It does not throw any exception if there is no default clause, as it does in Clojure:
(condp = :a :b true :c true) ;;=> nil- If a result expression is
nil, it throws an exception during macroexpansion:
basilisp.user=> (condp = "a"
"b" :b
"a" nil
"c" :c
:a)
exception: <class 'basilisp.lang.exception.ExceptionInfo'> from <class 'basilisp.lang.compiler.exception.CompilerException'>
phase: :macroexpansion
message: error occurred during macroexpansion: expected result expression {:test "a"}
form: (basilisp.core/condp = "a" "a" nil "c" :c :a)
location: <REPL Input>:NO_SOURCE_LINEMetadata
Metadata
Assignees
Labels
component:basilisp.coreIssue pertaining to basilisp.core namespaceIssue pertaining to basilisp.core namespaceissue-type:bugSomething isn't workingSomething isn't working