tools.analyzer

t.a(.jvm) returns ASTs with method calls having arg type nil in some cases

Details

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

Description

I haven't found a very short example of this, but on easy way to see such an AST is to update to the latest t.a(.jvm) and Eastwood (after 2 commits made late on Feb 10 2014 to Eastwood for extra debug info in this case), and run the following command while in the Eastwood project root directory:

$ lein eastwood '{:namespaces [ eastwood.util ]}'
== Eastwood 0.1.1-SNAPSHOT Clojure 1.5.1 JVM 1.7.0_15
== Linting eastwood.util ==
Error: Bad arg-type nil for method named identical for class clojure.lang.Util, full arg type list (java.lang.Object, nil).  ast pprinted below for debugging tools.analyzer:

[ ... rest of ast deleted for brevity ... ]

Perhaps the type info needed for Eastwood to do its deprecation checks on Java method calls is elsewhere in the AST now, but I haven't found it yet if so.

Activity

Hide
Nicola Mometto added a comment -

I fixed this on the eastwood side with https://github.com/jonase/eastwood/commit/6fa94fef3c25bc6b98fec9dc139f63d7b1db49fd

A tag for "nil" doesn't really make any sense, to avoid this errors ensure-tag replaces all nil tags with Object.

Show
Nicola Mometto added a comment - I fixed this on the eastwood side with https://github.com/jonase/eastwood/commit/6fa94fef3c25bc6b98fec9dc139f63d7b1db49fd A tag for "nil" doesn't really make any sense, to avoid this errors ensure-tag replaces all nil tags with Object.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: