WARN if recur passes non-inferred type

Description

Take this code as an example:

The type of x is inferred to be Boolean, but there is a recur form that can be statically deduced to be passing a non-Boolean.

This ticket asks that a WARN be issued for this case, and perhaps others (where maybe x itself is directly type hinted).

Environment

None

Attachments

4

Activity

Show:

Mike Fikes November 23, 2018 at 7:51 PM

Closing this in favor of CLJS-2873.

Mike Fikes April 16, 2018 at 1:53 PM

Assigning back to me to look at warnings being triggered:

Mike Fikes March 15, 2018 at 2:11 AM

CLJS-1561-3.patch rebaselines

Mike Fikes February 21, 2018 at 7:46 PM

Re-baselined on master, confirmed that the first example is now working again, added a new needed suppression for js type (to go along with any), and added analyzer unit tests covering the cases in the comments above so they need not be validated manually.

Mike Fikes June 14, 2017 at 3:31 AM

Assigning to take another look at this. The all of the examples provided in this ticket are still working apart from the first, which no longer appears to cause the diagnostic to be emitted.

Declined

Details

Assignee

Reporter

Patch

Code and Test

Affects versions

Priority

Created February 6, 2016 at 4:00 PM
Updated November 23, 2018 at 7:51 PM
Resolved November 23, 2018 at 7:51 PM