Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Denard Springle
Denard SpringlePriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 3 March 2017 at 18:48
Updated 14 May 2025 at 11:54
This is a re-open of an old issue raised by Ryan Guill (https://luceeserver.atlassian.net/browse/LDEV-255) regarding being able to dynamically call on static functions. The original ticket solved half of the problem Ryan had reported on (evaluating the right hand side of :: ) but did not resolve the left hand side.
Significantly, this code:
data = [ dynamicPath ]::getData();
throws a compile time error: Missing [;] or [line feed] after expression
In this code, `[ dynamicPath ]` should evaluate to `model.static`
I've included a .zip with a .cfm and a .cfc. Compile time errors are commented out individually in the .cfm code so you can test each case.
Use case is dynamically loading static data from possibly hundreds of CFCs in a dynamic way.
Workaround currently is to switch/case to static calls based on the passed in target CFC, which for hundreds of CFCs is daunting and not very maintainable.