Generic angle brackets have the wrong scope in situations like "variable = (A<B>) value" #132
Description
Description
This is an issue reported as part of #127.
Tested on the latest master branch 7a42895.
Code to reproduce:
class A {
void func() {
B<C> value = null;
value = (B<C>) obj;
}
}
The angle brackets on the line value = (B<C>) obj
have the wrong scope keyword.operator.comparison.java
, but should be punctuation.bracket.angle.java
.
Screenshot (click on the image for higher resolution):
Steps to Reproduce
- Open Atom new tab
- Select Java language
- Paste the code sample above
- Inspect angle brackets DOM elements in DevTools console
Expected behavior: [What you expect to happen]
Angle brackets in the code snippet above are scoped as punctuation.bracket.angle.java
Actual behavior: [What actually happens]
Angle brackets in the example above are scoped as keyword.operator.comparison.java
.
Reproduces how often: [What percentage of the time does it reproduce?]
Reproducible 100% - looks like a bug I might have introduced when fixing generics highlighting related to comparison operators.
Versions
Tested on both OS X and Ubuntu.
Atom 1.23.3+.
language-java
is the latest master.
Additional Information
This was reported originally in #127. For more information, please see that issue.