(I've tested in the last version of VSCode insiders and the bug is present as well)
VSCode Version: 1.35.0
OS Version: 10.14.5
Steps to Reproduce:
write a java file and set the language mode to java
in any method write a array literal and call a method in the value list (e.g. Object.clone())
observe the syntax coloring now gone wild
In this example if you uncomment the bug-causing line public from SomeConstructor gets scoped as meta.class.body.java, meta.class.java, source.java
public class TestBug {
static Object[] someTest;
static {
// Uncomment this to see the bug
// someTest = new Object[] {someArgs[0].clone(), someArgs[1].clone()};
}
public SomeConstructor(Object[] someArgs) {
}
}
Here are some exemple of the wrong coloring with the line commented (no bug) and not commented (bug active). Notice public:
NB:
this also works in static methods and in a static initialization block but not in the assignment of a static field at declaration.
this does not work at the declaration of the field (static or not)
the issue only impact method declared below the method in which the line is written
somehow writing it in a static block and right after as the declaration of a field cancels it (see below)
[EDIT: better description and better image]magic cancel : we can see that the static initialization block alter the coloring of the visibility of the next field however the next methods are not altered
Does this issue occur when all extensions are disabled?: Yes
Copied from https://github.com/microsoft/vscode/issues/75121
(I've tested in the last version of VSCode insiders and the bug is present as well)
Steps to Reproduce:
In this example if you uncomment the bug-causing line
public
fromSomeConstructor
gets scoped as meta.class.body.java, meta.class.java, source.javaHere are some exemple of the wrong coloring with the line commented (no bug) and not commented (bug active). Notice
public
:NB:
[EDIT: better description and better image]magic cancel : we can see that the static initialization block alter the coloring of the visibility of the next field however the next methods are not altered
Does this issue occur when all extensions are disabled?: Yes