eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Incorrect type shown when hovering over method call.

Open
#834 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
49

Description

Consider the following program:

```
package slask;

import java.util.*;

public class Program
{
public static void main(String[] args) throws Throwable
{
}

private static void f(List list)
{
var s = list.stream();

var ss = s;
}
}

```

When I hover over the method `stream` in the statement var `s = list.stream();` the incorrect return type `Stream` is shown. I was expecting the correct return type `Stream` to be shown. Note that when hovering over `s` the correct type `Stream` is shown. See images below:

Incorrect return type shown:
![image](https://user-images.githubusercontent.com/30007588/224965870-16667409-40ab-41e8-8f4d-daf70f851dd5.png)

Correct variable type shown:
![image](https://user-images.githubusercontent.com/30007588/224965752-6fd4d525-91b6-473f-a500-7cf85df68b05.png)

I'm using the following version of eclipse:

Version: 2022-12 (4.26.0)
Build id: 20221201-1913

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.