Last active
August 20, 2021 15:48
-
-
Save adamcameron/282be2ce74724fa740eafda3f37479cb to your computer and use it in GitHub Desktop.
Demonstrating one cannot have a static final method in Lucee or ColdFusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C2.cfc | |
component { | |
public static final string function g() { | |
return getFunctionCalledName(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function keyword is missing in FUNCTION declaration. | |
The CFML compiler was processing: | |
A script statement beginning with public on line 4, column 5. | |
The error occurred in C:/apps/ColdFusion/2021/cfusion/wwwroot/public/test/final/C2.cfc: line 4 | |
2 : component { | |
3 : | |
4 : public static final string function g() { | |
5 : return getFunctionCalledName(); | |
6 : } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Missing [;] or [line feed] after expression | |
The Error Occurred in | |
/var/www/public/nonWheelsTests/final/C2.cfc: line 4 | |
2: component { | |
3: | |
4: public static final string function g() { | |
5: return getFunctionCalledName(); | |
6: } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// testC2.cfm | |
writeDump(C2::g()) | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment