<p>Type checking cannot be trusted. Repro: <cfscript> function f1(numeric myNumeric) { return min(myNumeric, 1); } function f2(numeric myNumeric) { return myNumeric.min(1); } </cfscript> <cfscript> function f3(date myDate) { return dateAadd(“d”, 1, myDate); } function f4(date myDate) { return myDate.add(“d”, 1); } </cfscript> I can break someone’s f2 by passing a date to the numeric argument. I can break someone’s f4 by passing a numeric to the date argument. Look at f1 vs f2 and f3 vs f4. See the only […]</p>
<p>The post <a rel="nofollow" href="https://coldfusion.adobe.com/2018/06/type-checking-cannot-be-trusted/">type checking cannot be trusted</a> appeared first on <a rel="nofollow" href="https://coldfusion.adobe.com">ColdFusion</a>.</p>
Comments: