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:
Mike Fikes
May 26, 2019, 9:56 PM

CLJS-3081-0.patch LGTM

Mike Fikes
May 26, 2019, 1:06 PM

CLJS-3081-0.patch added to Patch Tender

Mike Fikes
May 22, 2019, 11:21 PM

CLJS-3081-0.patch passes Canary

Mike Fikes
May 22, 2019, 2:08 AM

CLJS-3081-0.patch passes CI

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

Nil check removed.

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

David Nolen

Reporter

Mike Fikes

Labels

Patch

Code