Sunday, May 20, 2018

CF-4202542 - final ignored

Issue: final ignored

Steps to Reproduce:
1) Run:

<cfscript>
  final variables.foo = "final honored"
  variables.foo = "final ignored"
  writeOutput(foo)//if `foo` is changed to `variables.foo`, then coldfusion.compiler.FinalVariableMutationException is thrown
</cfscript>

Actual Result: final ignored

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 3

2) Run:

<cfscript>
  final variables.foo = "final honored"
  variables.foo = "final ignored"
  writeOutput(variables.foo)
  foo = "I call hacks"//if this line is commented-out, then coldfusion.compiler.FinalVariableMutationException is thrown
</cfscript>

Actual Result: final ignored

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 3

3) Run:

<cfscript>
  final variables.foo = "final honored"
  foo = "final ignored"
  writeDump(foo)
</cfscript>

Actual Result: final ignored

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 3

4) Run:

<cfscript>
  function f() {
  final local.foo = "final honored"
  var foo = "final ignored"
  return foo
  }
  writeDump(f())
</cfscript>

Actual Result: final ignored

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 4

5) Run:

<cfscript>
  final variables.foo = "final honored"
  foo = function(){variables.bar="final ignored"}
  foo()
  writeOutput(isClosure(foo) & ' ' & bar)
</cfscript>

Actual Result: YES final ignored

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 3

6) Run:

<cfscript>
  final variables.foo = "bar"
  function foo() {}//this line is completely ignored
  writeDump(foo)
</cfscript>

Actual Result: bar

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 3

7) Run:

<cfscript>
  final cfthread="bar"
  cfthread(name="myThread"){}
  //thread name="myThread" {}//same issue
  thread action="join" name="myThread";
  writeDump(cfthread)
</cfscript>

Actual Result: bar

Expected Result: coldfusion.compiler.FinalVariableMutationException on line 3

8) Run:

mycustomtag.cfm

<cfscript>
  if(THISTAG.executionMode == "start") {
  final CALLER.foo = "final honored"
  }
</cfscript>

index.cfm

<cfscript>
  cfmodule(template="mycustomtag.cfm")
  foo = "final ignored"
  writeOutput(foo)
</cfscript>

Actual Result: final ignored

Expected Result: coldfusion.compiler.FinalVariableMutationException on index.cfm line 3

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

1 comment:

  1. A three-plate mould has an extra plate that makes the mould have two parting strains as a substitute of one. This added plate, or stripper plate, is positioned between the core and cavity plates and serves the purpose of routinely separating the cold runner system from the molded half upon ejection. This allows for a speedier Stockings manufacturing as no manual labor is needed to interrupt off the runner system and send it to recycling.

    ReplyDelete

ColdFusion member functions for XML object management

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