Open valerauko opened 4 years ago
The calls to unchecked-add in collections cause boxed math warnings when *unchecked-math* is enabled.
unchecked-add
collections
*unchecked-math*
https://github.com/ztellman/potemkin/blob/e8c64802b8772a90110434d1b515ce35b78b961b/src/potemkin/collections.clj#L120
https://github.com/ztellman/potemkin/blob/e8c64802b8772a90110434d1b515ce35b78b961b/src/potemkin/collections.clj#L128
Type hinting acc as long resolves the warning.
acc
long
The calls to
unchecked-add
incollections
cause boxed math warnings when*unchecked-math*
is enabled.https://github.com/ztellman/potemkin/blob/e8c64802b8772a90110434d1b515ce35b78b961b/src/potemkin/collections.clj#L120
https://github.com/ztellman/potemkin/blob/e8c64802b8772a90110434d1b515ce35b78b961b/src/potemkin/collections.clj#L128
Type hinting
acc
aslong
resolves the warning.