tracker issue : CF-4203083

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

Nested Properties Inaccessible in Closure

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Ben Botto / ()

Created: 07/16/2018

Components: Functions

Versions: 2016,11.0,13.0

Failure Type: Others

Found In Build/Fixed In Build: 2016.0.06.308055 / 2018.0.0.310807

Priority/Frequency: Normal /

Locale/System: / Win 2012 Server x64

Vote Count: 2

Problem Description: When closing over a var-scoped struct, nested properties are inaccessible.

Steps to Reproduce: Run the following gists.

https://trycf.com/gist/342c510137f2d7df9d405fa4dcf8caf9/acf2016?theme=monokai

Possible more succinct, with more details.

https://trycf.com/gist/1fb88ee8c4a05f95d2d6fe72f5cdc566/acf2016?theme=monokai

Actual Result:  In the first gist, "Fail" is printed.  someObj.nested1.nested2 is printed as "undefined" even though it's shown in the dump.

Expected Result:  "Pass" should be printed, and someObj.nested1.nested2 should be accessible.

Any Workarounds: Put `someObj` on `variables`, or get rid of the `var`.

Attachments:

Comments:

+1 this is odd and unexpected behaviour
Vote by John Whish
29322 | July 17, 2018 02:49:18 PM GMT