Uploaded image for project: 'Lucee Development'
  1. LDEV-219

IIFEs - Inline Closures do not execute but give a compiler error

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.5.1.015
    • Fix Version/s: 5.2.2.1
    • Labels:
      None
    • Sprint:
      May-June 2017 Sprint

      Description

      http://en.wikipedia.org/wiki/Immediately-invoked_function_expression

      This should work in CFML:

      (function(){
      writeOutput("hi");
      })();
      

      Where "work" means it outputs hi. This is a very contrived example, but being able to memory space blocks of code is quite handy in other languages, and that CFML has function expressions but NOT IIFEs seems a bit half-implemented.

      See equiv ColdFusion ticket: https://bugbase.adobe.com/index.cfm?event=bug&id=3950736

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                michaeloffner Michael Offner
                Reporter:
                da_cameron Adam Cameron
              • Votes:
                5 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: