7

In eclipse one of my Apex class showing syntax error on a particular line of code. But it compiled successfully without any issues. Any thoughts on why i am getting this error? Please see the error description and screen shot.

Syntax(error = UnexpectedSyntaxError(loc = RealLoc(startIndex = 5944, endIndex = 5948, line = 893, column = 9), message = mismatched input 'Case' expecting RCURLY))

enter image description here

1
  • the way to diagnose this is to selectively remove bits from the offending statement (by commenting out) until the error goes away - then you may have something that can be reported to SFDC Support if it is a compiler bug
    – cropredy
    Dec 16, 2015 at 16:59

1 Answer 1

1

It looks to me as though the editor thinks that should be a subquery starting on that line beginning with c.asset.description, but apparently it doesn't need to be, so the compiler allowed it to compile anyway. Either that or it's unhappy that you used a hard return on the first line of the query rather than letting the word wrap do it's thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.