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

Luke VanderHart made changes -
Field Original Value New Value
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.
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.
Luke VanderHart made changes -
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.
The compilation generates invalid code in the case where a map keyword contains a period (which is a legal character for a keyword).

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

Among other things, this precludes the use of core.match on Datomic data.
Luke VanderHart made changes -
Patch Code and Test [ 10002 ]
Attachment 0001-test-and-fix-for-MATCH-92.patch [ 12703 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: