Open nmtitov opened 6 years ago
Some additional detail to the exception messages resulting from using the dispatch macro (#) in a file.
Running basic set functions with alt-cmd-b at the end of the line of code produces expected outcomes.
Running set functions written with the dispatch macro and alt-cmd-b produces the following outcomes.
The REPL shows that the alt-cmd-b seems to be ignoring the "#" and treating the request as a map.
Running set functions written with the dispatch macro and alt-cmd-s with the code selected produces the following outcomes. The exception error in instances where there are duplicates states that there is an unmatched delimiter.
The REPL shows that the alt-cmd-s is running the "#" macro with an exception message that matches the issue with the attempted set creation (duplicate keys).
The alt-cmd-b method for running code from the file also ignores the quote macro character (') when building a list as seen in the following. Using cmd-alt-s with the code selected produces the expected outcome.
I can confirm and reproduce the same error on a mac.
When doing ctrl+option , then b in:
I get: Syntax Error at reading source at (REPL:3:9) Map literal must contain an even number of forms
While entering as: (set '(1 2 3)) returns the correct form #{1 2 3}
When I execute #{1 2 3} using alt-cmd-B on Mac I get a map exception message. Cursor position doesn't matter for me:
RuntimeException Map literal must contain an even number of forms clojure.lang.Util.runtimeException (Util.java:221)