directoryList filter param does not accept a closure

Description

In Lucee the filter param can be a closure. For example:

In BoxLang I get:

In function [directorylist], argument [filter] with a type of [boxgenerated.templates.Index$cfm$Func_filterBySize] does not match the declared type of [string]

Also note that (in ACF at least, not sure about Lucee) you can also pass in instances of Java FileFilter Objects.

Activity

Show:

Jon Clausen January 24, 2025 at 8:18 PM

No problem at all! I’m glad it’s fixed!

John Whish January 24, 2025 at 7:17 PM

Hmm, strange. I was using 1.0.0-snapshot then tried boxlang@be and got the same. On a different machine it works though so I think my artefacts need tearing down.

Sorry for the noise on the bug tracker.

Jon Clausen January 24, 2025 at 3:27 PM

Linked issue which was implemented 5 months ago:

I do not see any modifications in the compat module that would be overriding the type of any allowed as the filter argument.

Jon Clausen January 24, 2025 at 3:24 PM

could you send me the build information ( dump server.boxlang ) and a full stack trace? The directoryList filter argument does accept a function or closure so I’m confused as to where this error is occurring.

Cannot Reproduce
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created January 24, 2025 at 12:49 PM
Updated January 24, 2025 at 8:18 PM
Resolved January 24, 2025 at 8:18 PM