core.memoize

Reflection warning in clojure.core.memoize/snapshot

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    core.memoize 0.5.6, Clojure 1.5.1
  • Patch:
    Code

Description

When core.memoize is used with *warn-on-reflection* set to true:

Reflection warning, clojure/core/memoize.clj:72:23 - reference to field cache can't be resolved.

Activity

Hide
Andy Fingerhut added a comment -

Patch cmemoize-13-v1.patch eliminates the reflection in fn snapshot by type-hinting the value of @cache

Show
Andy Fingerhut added a comment - Patch cmemoize-13-v1.patch eliminates the reflection in fn snapshot by type-hinting the value of @cache
Andy Fingerhut made changes -
Field Original Value New Value
Attachment cmemoize-13-v1.patch [ 12890 ]
Andy Fingerhut made changes -
Patch Code [ 10001 ]
Hide
Alex Miller added a comment -

Applied patch

Show
Alex Miller added a comment - Applied patch
Alex Miller made changes -
Resolution Completed [ 1 ]
Assignee Fogus [ fogus ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: