atom / language-java

Java package for Atom
Other
62 stars 58 forks source link

Wrong highlighting of variable definition, when = is on the next line #170

Open sadikovi opened 6 years ago

sadikovi commented 6 years ago

Prerequisites

Description

When writing code like this:

class A {
  static String CONSTANT_1 = "abc";
  static String CONSTANT_2 = 
    "abc";
  // Wrong highlighting
  static String CONSTANT_3 
    = "abc";
}

The last CONSTANT_3 has wrong highlighting, see image below:

screenshot

Steps to Reproduce

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

Expected behavior: [What you expect to happen]

CONSTANT_3 is highlighted the same way as CONSTANT_1 and CONSTANT_2.

Actual behavior: [What actually happens] It is not highlighted the same way.

Reproduces how often: [What percentage of the time does it reproduce?] 100%

Versions

Atom : 1.32.1 Electron: 2.0.9 Chrome : 61.0.3163.100 Node : 8.9.3

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Vigilans commented 5 years ago

This only reproduces when varibale is upper-case: image