Monday, May 21, 2018

CF-4202543 - NULL is not final

Issue: NULL is not final

Steps to Reproduce:
1) Run:

<cfscript>
  null = "asdf"
  foo = variables.null
  bar = null
  writeDump(variables)
</cfscript>

Actual Result:

struct
BAR asdf
FOO asdf
NULL asdf

Expected Result:

struct
BAR [null]
FOO asdf
NULL asdf

2) Run:

<cfscript>
  function null() {
    var bar = null
    return bar
  }
  writeDump(null())
  writeDump(variables)
</cfscript>

Actual Result:

function null
Arguments: none
ReturnType: Any
Roles:  
Access: public
Output:  
DisplayName:  
Hint:  
Description:  
struct
NULL
function null
Arguments: none
ReturnType: Any
Roles:  
Access: public
Output:  
DisplayName:  
Hint:  
Description:  

Expected Result:

[null]
struct
NULL
function null
Arguments: none
ReturnType: Any
Roles:  
Access: public
Output:  
DisplayName:  
Hint:  
Description:  

Suggestions:
1) `bar=null` should always be shorthand for `bar=javaCast("null","")`
2) `var bar=null` should always be shorthand for `var bar=javaCast("null","")`
3) scoping is required, in order to set bar equal to the value of a variable named null (ex: `bar=variables.null` and `var bar=local.null`)

Verified in build 2018.0.01.308605 (PreRelease).
Filed as CF-4202543.

1 comment:

  1. How to Play Free Slots Online: 9 Casino Sites
    Learn all about online slots and what it's like to 바카라사이트 play free slot games online. Find out how to play online games in the best real 바카라사이트 money casinos online!

    ReplyDelete

ColdFusion member functions for XML object management

Prior to ColdFusion 2018, ColdFusion supported the following XML member functions : .elemNew() (equivalent of XmlElemNew ) .childPos(...