Named parameters using colon notation. Bug?

25 views
Skip to first unread message

Maor Leger

unread,
Aug 29, 2013, 2:35:14 PM8/29/13
to cfml-plugin-fo...@googlegroups.com
Hey everyone,

Suppose I have the following function def:
<cffunction name="Test" ...>
<cfargument name="arg1" type="any" required="true">
<cfargument name="arg2" type="any" required="true"> 
</cffunction>

And I try to invoke it as follows:
<cfset Test(arg1: someArg, arg2: someArg) />

I notice that IntelliJ gets a parsing error as it does not understand the colon notation.

Same goes for struct initialization.

<cfset var x = { var1 : "hello", var2 : "world" } />

Does anyone have experience with this issue and can lend some advice? I like using colon notation, instead of equal sign notation and would love if IntelliJ didn't get mad when it happened.

If there's some way to fix this on my end, could you let me know how you did it? Otherwise, should I file a bug about this?

Thanks!


Jamie Krug

unread,
Aug 29, 2013, 4:46:07 PM8/29/13
to cfml-plugin-fo...@googlegroups.com
The colon has been allowed in Railo's CFML forever, but only a more recent Adobe ColdFusion release allowed colon, as opposed to equal signs. IDEA's CFML support parses based upon CF9 guidelines, I believe. You can switch the language version to Railo, but unfortunately, that one is even more buggy than the slightly dated ACF one.


--
You received this message because you are subscribed to the Google Groups "CFML plugin for IntelliJ IDEA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfml-plugin-for-inte...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages