Add warnings for invalid use of aget and aset

Description

Warn on improper use of aget and aset for objects.

Environment

None

Attachments

5

Activity

Show:

David Nolen July 3, 2017 at 10:30 PM

Antonin, you wish The patch w/o inference has been applied as of https://github.com/clojure/clojurescript/commit/fb6c04f4ae16877ba7fa797e9378d8a1ba74fd89

Antonin Hildebrand July 3, 2017 at 10:30 PM

In release notes you could maybe also plug my cljs-oops library as a possible consideration for replacement

https://github.com/binaryage/cljs-oops

Mike Fikes July 3, 2017 at 9:04 PM

The attached CLJS-2148-Add-unsafe-get-and-use-goog.object.patch is intended to replace CLJS-2148-Address-new-aget-aset-warnings.patch. It accomplishes the same overall goal, but specifically adds a new unsafe-get macro that can be used in performance critical code where goog.object/get would introduce a perf regression. It uses that new macro in the places mentioned above.

Mike Fikes July 3, 2017 at 7:14 PM

The few critical places comprise native-satisfies?, hash-string, quote-string, defprotocol

Completed

Assignee

Reporter

Patch

Priority

Created July 1, 2017 at 9:51 PM
Updated July 3, 2017 at 10:35 PM
Resolved July 3, 2017 at 10:35 PM