Title:
[elvis] Elvis operator issue when the third operand is a function or variable
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / ext-user (Suchika Singh)
Created: 03/11/2015
Components: Language
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11 Update5 /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win XP All
Vote Count: 0
Run the following code:
<cfscript>
function myfunc(myinput)
{
if (myinput=="suchi")
return javacast("null","") ;
else
return myinput;
}
function getById( id ){
y = 10;
return myfunc(id) ?: y?:myfunc(90990);
}
</cfscript>
<cfset myobj=getById("suchi")>
<cfdump var="#myobj#">
Result: MyObj is undefined
Expected:10
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3951221
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: