You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
(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
publicclassTestBug {
staticObject[] someTest;
static {
// Uncomment this to see the bug// someTest = new Object[] {someArgs[0].clone(), someArgs[1].clone()};
}
publicSomeConstructor(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