Uploaded image for project: 'core.async'
  1. ASYNC-190

(CLJS) Some non-tail-recursive loops compile without error

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:

      Clojurescript

      Description

      The following code compiles without error using core.async 0.3.442:

      (go-loop []
        (when true
          (recur))
        1)
      

      The same loop structure without core.async causes the compiler to error ("ERROR: Can't recur here at..."):

      (loop []
        (when true
          (recur))
        1)
      

      Interestingly, some non-tail-recursive loops correctly fail to compile. For example the following fails with "ERROR: No implementation of method: :emit-instruction...":

      (go-loop []
        (do
          (recur)
          1))
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: