core.match

Map matching is broken for keywords with periods

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Clojure 1.6 alpha
  • Patch:
    Code and Test

Description

The compilation generates invalid code in the case where a map keyword contains a period (which is a legal character for a keyword).

 
(match {:a.b 1}
   {:a.b _} :foo)
;; CompilerException java.lang.ClassFormatError: Illegal field name "ocr_5762_0__5765_a.b__5768"

Among other things, this precludes the use of core.match on Datomic data.

Activity

Hide
David Nolen added a comment -

Thanks for the report seems simple to fix.

Show
David Nolen added a comment - Thanks for the report seems simple to fix.
Hide
Luke VanderHart added a comment -

Awesome. Are you looking at it right now? Otherwise I might dig into the code myself since this is blocking me at the moment.

Show
Luke VanderHart added a comment - Awesome. Are you looking at it right now? Otherwise I might dig into the code myself since this is blocking me at the moment.
Hide
Luke VanderHart added a comment -

Uploaded patch

Show
Luke VanderHart added a comment - Uploaded patch
Hide
David Nolen added a comment -

Patch looks good to me. Thanks! I will apply later today and cut another release.

Show
David Nolen added a comment - Patch looks good to me. Thanks! I will apply later today and cut another release.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: