Status/Resolution/Reason: Closed/Withdrawn/DesignLimitation
Reporter/Name(from Bugbase): Fred Leefarr / Fred Leefarr ()
Created: 11/30/2017
Components: Language
Versions: 11.0
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: dev /
Priority/Frequency: Normal / All users will encounter
Locale/System: UK English / Windows 10 64 bit
Vote Count: 0
Problem Description:
The elvis operator does not work when using a variable as a struct key.
Steps to Reproduce:
{code:java}
?<cfscript>
function test() {
var foo = {
test_123456 = "result"
};
var key = "test_123456";
var result = foo[key] ?: "undefined!";
WriteOutput(result);
}
test();
</cfscript>
{code}
Actual Result:
"undefined!"
Expected Result:
"result"
Any Workarounds:
Use IsDefined()
Attachments:
Comments: