Bug 515602 - error occurs while trying to format code including a return statement which is missing the semicolon
Summary: error occurs while trying to format code including a return statement which i...
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-21 23:56 EDT by Terry Qiao CLA
Modified: 2017-04-24 09:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Qiao CLA 2017-04-21 23:56:33 EDT
Here is an example:

My code:

    function foo(a) {
        if (a < 0) {
            return
        }
        // ......
    }

If I try to format this source code, the formatter will not work. But if I add a semicolon to return statement, and then format it again, it works.
Comment 1 Carl Anderson CLA 2017-04-24 09:36:43 EDT
Terry, I am assuming that this is JavaScript (since you just opened another bug against JavaScript).  However, please provide useful details like the language being formatted, the version of Eclipse being used (the latest is Neon.3- is that what you are using?) and how you are getting WTP (are you using the Java EE EPP?  Did you install part of WTP by itself?)