Lucee 6 upgrade issue - cfc with cfscript function conflicts with built in function

We are working on upgrading to Lucee 6 (6.0.3.1) and have come across a few compatibility issues. We’ve been able to work around all of them so far but figured we’d post them here in case there is interest in fixing them up.

In this compatibility issue, we have a component that defines a function compare() that is being reported as a conflict with the built in function of the same name. The exact error message appears as:

failure in <filename> ;The name [compare] is already used by a built in Function

In creating a test case for this we noticed that the use of a cfcomponent tag with a cfscript tag was necessary to reproduce the problem.

Here is a test case and the workaround (using a component without the cfscript tag).

file componentTest.cfm

<cfscript>
testComponent = new buildInConflict();
testComponent.compare();

testComponent2 = new builtInConflict2();
testComponent2.compare();
</cfscript>

File builtInConflict.cfc - this works ok

component {
    public void function compare(struct rc) { 
        writeOutput("Test me");
    }
}

File builtInConflict2.cfc - this produces the error in lucee 6 but not 5

<cfcomponent>
<cfscript>
    public void function compare(struct rc) { 
        writeOutput("Test me");
    }
</cfscript>
</cfcomponent>