Skip to main content
Ben Nadel at cf.Objective() 2014 (Bloomington, MN) with: Matthew Reinbold
Ben Nadel at cf.Objective() 2014 (Bloomington, MN) with: Matthew Reinbold

Set Is Not A Param, Return, Or Argument "Type" In ColdFusion 2025.0.14

By
Published in — Comments (1)

While Adobe introduced Sets as a data structure in ColdFusion 2025.0.8, it seems that the notion of a Set wasn't fully integrated into the type system that ColdFusion offers. You can create and consume Sets no problem — you just can't mandate a set within a param tag, a function return type, or an argument type. Doing so throws an error as of ColdFusion 2025 update 14.

Attempting to use set as a Function return type:

<cfscript>

	writeDump( buildSet() );

	private set function buildSet() {
		return setNew();
	}

</cfscript>

Throws error: "The value returned from the buildSet function is not of type set."

Attempting to use set as a CFParam type:

<cfscript>

	param name="mySet" type="set" default=setNew();

	writeDump( mySet );

</cfscript>

Throws error: "The type attribute has an invalid value."

Attempting to use set as a CFArgument type:

<cfscript>

	writeDump( echoValue( setNew() ) );

	private any function echoValue( required set mySet ) {
		return mySet;
	}

</cfscript>

Throws error: "The MYSET argument passed to the echoValue function is not of type set."

Attempting to use set in an isValid() call:

<cfscript>

	mySet = setNew();

	writeDump( isValid( "set", mySet ) );

</cfscript>

Throws error: "Valid type arguments are: any, array, Boolean, date, numeric, query, string, struct, UUID, GUID, binary, integer, float, eurodate, time, creditcard, email, ssn, telephone, zipcode, url, regex, range , component, and variableName."

Oh man, it's a bad day to be a ColdFusion Set on my blog - 3rd post this morning on Set-related bugs. I get the sense that Sets were added merely to enable the AI-related functionality; and only indirectly to be consumed by CFML developers.

Want to use code from this post? Check out the license.

Reader Comments

Post A Comment — I'd Love To Hear From You!

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
— Ben Nadel
Managed ColdFusion hosting services provided by:
xByte Cloud Logo