vscode-java
vscode-java copied to clipboard
Constructor code completion is broken in certain situations
Given the following code:
import java.util.*;
public class Hello {
public static void main(String[] args) {
List<String> list = new ArrayList<>();
list = new ArrayList<>();
}
}
When you autocomplete on the first ArrayList, (triggering autoimport of java.util.ArrayList is a usual use case), the result breaks the existing code, regardless of the java.completion.overwrite preference.
If you repeat the completion step on the LinkedList constructor, the completion doesn't provide you with a list of constructors for some reason, only the type, and applying the completion item doesn't break the code:
