Welcome! Please see the About page for a little more info on how this works.

0 votes
in Compiler by

{{(fn [a-b a_b] (fn [] a_b a-b))}}
{{CompilerException java.lang.ClassFormatError: Duplicate field name&signature}}

2 Answers

0 votes

Comment made by: bronsa

This is caused due to how clojure munges - as simply _ -- another way to trigger a similar error is:

user=> (deftype x [a_b a-b]) Syntax error (ClassFormatError) compiling deftype* at (REPL:1:1). Duplicate field name "a_b" with signature "Ljava.lang.Object;" in class file compile__stub/user/x

Fixing this would require changing the name munging scheme clojure has been using for the past 10 years, which could have some severe unexpected consequences, not sure how viable that would be

0 votes
Reference: https://clojure.atlassian.net/browse/CLJ-2518 (reported by fmnoise)