Open russplaysguitar opened 11 years ago
Should also fail if start_pos
> end_pos
@atuttle does that compile on either CF10 or Railo4?
On ACF10 it does compile, but it also throws a runtime error.
<cfset foo = [1,2,3,4,5,6,7,8,9,10] />
If there's a compilation error, this text won't be seen.
If it's a runtime error, you should see it... I think?
<cfdump var="#foo#" />
<cfflush />
<cfset arraySet( foo, 4, 2, 0 ) />
<cfdump var="#foo#" />
Thanks for the follow up. On one issue (not sure which), there was discussion about not writing lint rules for things which throw errors. I've opened #37 to help clarify that. I think that the rule you proposed falls under that general category?
Yeah, agreed.
This should cause a lint warning if the start_pos and end_pos are the same, since that offers no advantage over traditional array usage (
myArray[index] = 'value'
).