eclipse-jdt / eclipse-jdt/eclipse.jdt.core
TypeMismatch in functional results
Open
compiler
javac
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
This example taken form the original API documentation for StackWalker compiles without any warnung and works well with command line Compilers.
But it shows an errort "`Type mismatch: cannot convert from Object to Optional`" in the java editor.
```
StackWalker walker = StackWalker.getInstance(Option.RETAIN_CLASS_REFERENCE);
Optional> walk2 = walker.walk(s -> s.map(StackFrame::getDeclaringClass).findFirst());
```
Eclipse Version 2025-06 (4.36.0)
Build id: 20250605-1316
On Windows 10
With Eclipse builtin Java Version
Contributor guide
Assessment
This issue has not been assessed yet.