tracker issue : CF-4199440

select a category, or use search below
(searches all categories and all time range)

The Elvis operator seems to have been botched under CF 2016. CF 11 it was fine.

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Stephen Johnson / Stephen Johnson ()

Created: 08/07/2017

Components: Language

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016,0,03,301771 /

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 1

Problem Description: Elvis operator returns different results in CF 11 vs. CF 2016. The results under CF 11 make sense. Those under CF 2016 don't. We are having to back out our use of this operator.

Steps to Reproduce: Under CF 11 (Windows or Linux)  and CF 2016 run this:

 st = {a=1, b=0, c=false  };
    writedump( {

CF11 Result: 

In the dump, CF 11 returns 1 for a, 0 for b, false for c, and null for d.

The results look good and make perfect sense. st.a is defined and equal to 1, st.b is defined and equal to 0, st.c is defined and equal to false, and st.d is undefined and, therefore, equal to null.

CF 2016 Result: 

In the dump, CF 2016 returns 1 for a (good!), null for b (what?!!!), null for b (again what!!!?), and null for d (I can't trust this!)

Any Workarounds:

Elvis has left the building for those of you born before 1970! I can no longer trust this operator.



We already have a bug logged for this , hence closing it . Bug link:
Comment by Suchika S.
443 | August 09, 2017 06:56:38 AM GMT