Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java cast exception when parsing include where template argument is a function result #506

Closed
SteveLeve opened this issue Dec 27, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@SteveLeve
Copy link

tried this in 1.2.0, 1.2.3, and 1.3.0 with very similar results.

	// fails with java exception 
	include getTemplatetoInclude();

java.lang.ClassCastException: cfml.parsing.cfscript.CFFunctionExpression cannot be cast to cfml.parsing.cfscript.CFStringExpression

attached demo
CfLint.zip

incidentally; is there a good way to skip an include or a block?
in jshint we have jshint ignore:start to jshint ignore:end
I did try the jshint ignore:line syntax, but that didn't seem to do the trick

I got into this because of this error being thrown in an include, but would be happy to have the parser omit the include in this case.

Thanks;

@ryaneberly ryaneberly self-assigned this Dec 28, 2017
@ryaneberly ryaneberly added this to the 1.3.0 milestone Dec 28, 2017
@ryaneberly ryaneberly added the bug label Dec 28, 2017
ryaneberly added a commit that referenced this issue Dec 28, 2017
@ryaneberly
Copy link
Contributor

@SteveLeve . Thanks for reporting this bug with clear examples. It is fixed and will be included in 1.3.0

There was no way to ignore that exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants