Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to infer generic type #384

Closed
Jose-Luis opened this issue Apr 30, 2018 · 1 comment
Closed

Unable to infer generic type #384

Jose-Luis opened this issue Apr 30, 2018 · 1 comment

Comments

@Jose-Luis
Copy link

@Jose-Luis Jose-Luis commented Apr 30, 2018

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!)

  • OS: Linux 4.14.35-1
  • Vim version:
  • Neovim version: 0.2.2

Q&A

  • Yes, I tried minimal .vimrc configuraion.
  • Yes, I have enabled logs with JCdebugEnableLogs and can put here content of JCdebugGetLogContent command, if you need.
  • Even, if you wish, I can set g:JavaComplete_JavaviDebug to 1, than set g:JavaComplete_JavaviLogfileDirectory, and put here server logs, too.

Screenshot (Optional)

The output of :redir and :message (Optional)

@artur-shaik

This comment has been minimized.

Copy link
Owner

@artur-shaik artur-shaik commented May 15, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.