Uploaded image for project: 'tools.reader'
  1. TRDR-50

Warning when using upper-limit in self-host cljs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Labels:
      None

      Description

      Hi!

      I have found out that a warning is triggered when upper-limit is used in a self-host environment like lumo. For testing it out, the following can be done:

      $ lumo
      Lumo 1.8.0-beta
      ClojureScript 1.9.946
      Node.js v9.2.0
       Docs: (doc function-name-here)
             (find-doc "part-of-name-here")
       Source: (source function-name-here)
       Exit: Control+D or :cljs/quit or exit
      
      cljs.user=> (def ^:private ^:const upper-limit (int \uD7ff))
                                                     ⬆
      WARNING: cljs.core/bit-or, all arguments must be numbers, got [string number] instead. at line 1 
                                                     ⬆
      WARNING: cljs.core/bit-or, all arguments must be numbers, got [string number] instead. at line 1 
      #'cljs.user/upper-limit
      cljs.user=>
      

      It seems like the \u unicode notation is not really tranformed because I see the code compiled is something like:

      cljs.tools.reader.edn.upper_limit = ("\uD7FF" | (0));
      

      While probably this should be converted to an integer?

      Not sure how this should be handled actually.

        Attachments

          Activity

            People

            • Assignee:
              bronsa Nicola Mometto
              Reporter:
              arichiardi Andrea Richiardi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: