Skip to content

Syntax checker digs too deep into Java blocks #17

@michaelalandawson

Description

@michaelalandawson

In the following code, the "return" statement is flagged as an error:

A return statement must be contained inside a function body. cfls

Maybe the syntax checker should ignore the code inside java{} and <cfjava /> blocks?

Thanks!

<cfscript>
instance = java {
	import java.math.BigDecimal;
	import com.braintreegateway.*;

	public class Braintree {

		public static BraintreeGateway getGateway() {
			BraintreeGateway gateway = new BraintreeGateway(
				Environment.SANDBOX,
				"xxx",
				"xxx",
				"xxx"
			);

			return gateway;
		}

	}
}
</cfscript>

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions