dcolthorp / matchure

Powerful, idiomatic pattern matching for clojure
159 stars 8 forks source link

nil in match causes NullPointerException #4

Closed Storkle closed 13 years ago

Storkle commented 13 years ago

(matchure/if-match [[3 4] nil] 3 nil)

fix: in compile.clj (line 192) , change (or (instance? clojure.lang.Seqable ~matching-name) (instance? Iterable ~matching-name) (.isArray (class ~matching-name))) to

(or (instance? clojure.lang.Seqable ~matching-name) (instance? Iterable ~matching-name) (and ~matching-name (.isArray (class ~matching-name))))

dcolthorp commented 13 years ago

Fixed. Releasing a new version soon.

dcolthorp commented 13 years ago

Pushed a new version to clojars with this fix.

Storkle commented 13 years ago

thanks!