tracker issue : CF-3135080

select a category, or use search below
(searches all categories and all time range)
Title:

Cannot invoke anonymous functions

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/LowImpact

Reporter/Name(from Bugbase): Nathan Strutz / Nathan Strutz (Nathan Strutz)

Created: 03/12/2012

Components: Language

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: Public Beta /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Windows 7 SP1 64-bit

Vote Count: 0

Problem Description:
I can't create and invoke a function in one step.

Steps to Reproduce:
Code:
val = function () { return true; }();

Actual Result:
Returns a syntax error:
Invalid construct.
A script statement must end with ";".

Expected Result:
Anonymous function is executed.

Any Workarounds:
Use a named function expression and invoke it in 2 lines of code. Unintuitive.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3135080

External Customer Info:
External Company:  
External Customer Name: mrnate
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments: