BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Cannot access variables scope in a static context -- but there is no variables access

Description

Boxlang is recognizing the following code block as an attempt to access the variables scope in the static context. This is a minimal repro:

component { static { zzz = ( () => { var pattern = 42; // uncomment for breakage return 42; } )( ); } writedump(static.zzz) }

 

And here’s the code that is throwing in our app:

Cannot access variables scope in a static context File Method /app/modules_app/invoices/models/qInvoiceLineItem.cfc:98 96: stripeRefundMetadataKey = ( 97: () => { 98: pattern = createObject( "java", "java.util.regex.Pattern" ).compile( 99: "(?i)^qInvoiceLineItem_(\d+)_(\d+)$" 100: );

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Sentry

Created January 23, 2025 at 5:06 PM
Updated January 23, 2025 at 7:34 PM
Resolved January 23, 2025 at 7:34 PM

Flag notifications