tools.analyzer

Exception 'Ambiguous method signature for method: cons' when Eastwood analyzes namespace clojure.core.match

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

With latest tools.analyzer(.jvm), Eastwood, and core.match:

$ lein eastwood '{:namespaces [ clojure.core.match ]}'
[ ... many lines deleted ... ]
Exception thrown during phase :analyze of linting namespace clojure.core.match
Got exception with extra ex-data:
    msg='Ambiguous method signature for method: cons'
    (keys dat)=(:file :method :interfaces :form :params :matches)
    (:form dat)=
(^{:line 307, :column 4, :end-line 307, :end-column 8} cons
 [^{:line 307, :column 10, :end-line 307, :end-column 11} _
  ^{:line 307, :column 12, :end-line 307, :end-column 13} x]
 (^{:line 308, :column 6, :end-line 308, :end-column 17} PatternRow.
  (^{:line 308, :column 19, :end-line 308, :end-column 23} conj
   ^{:line 308, :column 24, :end-line 308, :end-column 26} ps
   ^{:line 308, :column 27, :end-line 308, :end-column 28} x)
  ^{:line 308, :column 30, :end-line 308, :end-column 36} action
  ^{:line 308, :column 37, :end-line 308, :end-column 45} bindings))
ExceptionInfo Ambiguous method signature for method: cons
	clojure.core/ex-info (core.clj:4355)
	clojure.tools.analyzer.passes.jvm.validate/eval2516/fn--2518 (validate.clj:289)
	clojure.lang.MultiFn.invoke (MultiFn.java:227)
	clojure.tools.analyzer.passes.jvm.validate/validate (validate.clj:326)
	clojure.tools.analyzer.ast/cycling/fn--53 (ast.clj:19)

[ ... many lines deleted ... ]

Activity

Hide
Nicola Mometto added a comment -

https://github.com/clojure/tools.analyzer.jvm/commit/f820fe3da5e37e4532beb04de814f45eb81b7919

I rewrote the logic for try-best-match, now it's much simplier and should cover all the cases.

Show
Nicola Mometto added a comment - https://github.com/clojure/tools.analyzer.jvm/commit/f820fe3da5e37e4532beb04de814f45eb81b7919 I rewrote the logic for try-best-match, now it's much simplier and should cover all the cases.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: