binaryage / cljs-oops

ClojureScript macros for convenient native Javascript object access.
Other
350 stars 13 forks source link

Warnings with :checked-arrays :warn #14

Closed kamituel closed 6 years ago

kamituel commented 6 years ago

Compiling an app that uses cljs-oops with the latest ClojureScript (1.9.946) with :checked-arrays :warn compiler option, the following warnings are printed:

WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [nil string] instead (consider goog.object/get for object access) at line 10 resources/public/js/build/oops/helpers.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [nil string] instead (consider goog.object/get for object access) at line 20 resources/public/js/build/oops/helpers.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [nil string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [js string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [nil string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 28 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [nil string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [js string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [nil string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs
WARNING: cljs.core/aget, arguments must be an array followed by numeric indices, got [any string] instead (consider goog.object/get for object access) at line 31 resources/public/js/build/oops/core.cljs

Would be nice not to see those warnings :)

darwin commented 6 years ago

You are right. I use aget in my helper functions. I should review all usages to avoid those warnings.