Closures lose scope when using dynamic proxy

Description

This is a tricky one to explain. So I have a attached a full reproducible test case. Also, it works on ACF11, 2016 and 2018. Breaks in Lucee 5.

Basically the bug is when you declare a closure that receives items. The closure is then wrapped in a CFC which is used as a dynamic proxy. Any calls to the items received by the proxied closure loose all state.

Environment

None

Status

Assignee

Michael Offner

Reporter

Luis Majano

Labels

None

Sprint

None

Fix versions

Affects versions

5.2.9.33

Priority

Major
Configure