atom / language-java

Java package for Atom
Other
62 stars 58 forks source link

Comments before inner class's class body break out the current scope #209

Closed Vigilans closed 4 years ago

Vigilans commented 4 years ago

Prerequisites

Description

Original

IJobChangeListener listener = new JobChangeAdapter()
{
    @Override
    public void scheduled(IJobChangeEvent event) {
        if (event.getJob() instanceof UpdateClasspathJob) {
            jobInvocations[0] = jobInvocations[0] + 1;
        }
    }
};

image

Scope of {:

Scope of event:

Add a single line comment before class body

image

Scope of {:

Scope of event:

Add a multi line comment before class body

image

Scope is the same as single line comment.

Steps to Reproduce

  1. Open new tab and select Java language.
  2. Paste code into the editor.

Expected behavior: The existence of comment does not affect the syntax of inner-class.

Actual behavior: Comments before inner class's class body break out the current scope

Reproduces how often: Always

Versions

Additional Information