artur-shaik / vim-javacomplete2

DEPRECATED in favor of jc.nvim
Vim License
973 stars 83 forks source link

Unable to infer generic type #384

Closed Jose-Luis closed 5 years ago

Jose-Luis commented 6 years ago

Actual behavior (Required!)

When I try to complete on 'funtionMap', the 'get' method of the Map find 'Object' instead of 'Function<Integer, Integer>'

import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;

public class NewClass {

    private Map<String,Function<Integer, Integer>> functionMap; 

    public void testMethod() {
        this.functionMap = new HashMap<>();
        this.functionMap.get
    }
}

Expected behavior (Required!)

The type of the object completed coincide with the var type

The steps to reproduce actual behavior (Required!)

  1. Copy the code above
  2. Try to complete functionMap

Environment (Required!)

Q&A

Screenshot (Optional)

The output of :redir and :message (Optional)

artur-shaik commented 6 years ago

As I remember it was limitation of the javaparser. But I definitely should check it again.