Undeclared var regression in fn bodies

Description

No longer produces a warning. Probably related to the changes to suppress double warnings as a result of fn invoke optimization. The fix needs to also supply an analyzer test case.

Environment

None

Activity

Show:
David Nolen
June 30, 2017, 9:31 AM

Actually I looked into this - not related to changes around double warnings an fn optimization. Dropping `warning-for` from analyze does not change the behavior.

Mike Fikes
June 30, 2017, 10:58 AM

git bisect shows that this regression was introduced with the commit for CLJS-2066.

Mike Fikes
June 30, 2017, 1:28 PM

The root cause is fairly cut-n-dry. The solution is fairly straightforward, but perhaps a little more complex than desired. Explanation is in commit comment in the attached patch. Adds a regression test specifically for this case.

Mike Fikes
June 30, 2017, 1:53 PM

Since method param analysis never results in warnings being emitted, a much simpler (1-line) patch is sufficient for the problem. Attaching a v2 patch as an alternative to consider.

David Nolen
July 1, 2017, 12:19 AM
Completed

Assignee

David Nolen

Reporter

David Nolen

Labels

None

Approval

Accepted

Patch

Code and Test

Fix versions

Affects versions

Priority

Critical