Uploaded image for project: 'Clojure'
  1. CLJ-103

GC Issue 99: Incorrect error with if-let

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: Release 1.5
    • Labels:
      None
    • Approval:
      Ok
    • Patch:
      Code

      Description

       Reported by rosejn, Mar 19, 2009
      
      Example:
      user=> (if-let [foo (+ 1 2)] foo + 1 foo)
      java.lang.IllegalArgumentException: if-let requires a vector for its
      binding (NO_SOURCE_FILE:2)
      
      The error reports that if-let requires a vector for its binding, but the
      problem here has nothing to do with the binding being a vector.  A paren
      was forgotten before the '+', so the number of arguments is incorrect for
      the if form.
      
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: