Eliminate redundant nil check in pr-sequential-writer

Description

In cljs.core/pr-sequential-writer, there is a loop that initializes n to be the result of dec, and upon recur, dec is also caused to form the next value of n.

In the scope of that loop there is an expression

which can be simplified to

because n is known to be a number, and cannot be nil.

Environment

None

Activity

Show:
Martin Kučera
May 20, 2019, 1:14 PM

Nil check removed.

Mike Fikes
May 22, 2019, 2:08 AM

CLJS-3081-0.patch passes CI

Mike Fikes
May 22, 2019, 11:21 PM

CLJS-3081-0.patch passes Canary

Mike Fikes
May 26, 2019, 1:06 PM

CLJS-3081-0.patch added to Patch Tender

Mike Fikes
May 26, 2019, 9:56 PM

CLJS-3081-0.patch LGTM

Assignee

David Nolen

Reporter

Mike Fikes

Labels

Approval

None

Patch

Code

Priority

Minor
Configure