| Summary: | Cannot evaluate expression which has lambda statements where there are static imports | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Gayan Perera <gayanper> |
| Component: | Debug | Assignee: | Gayan Perera <gayanper> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sarika.sinha |
| Version: | 4.19 | ||
| Target Milestone: | 4.21 M1 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/180745 https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/180746 https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=9fc7d75b55627a59392f4124bb4fb5df982ac14a https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=e058e5a5a1f22f0358b4f46400c69491a993d792 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 574681 | ||
I will provide a fix for this :) New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/180745 New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/180746 Added this to 4.21-M1 since this is not a regression in 4.20. Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/180745 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=9fc7d75b55627a59392f4124bb4fb5df982ac14a Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/180746 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=e058e5a5a1f22f0358b4f46400c69491a993d792 Thanks Gayan! I20210704-1800 |
Take the following code package app; import static java.lang.Math.max; import java.util.stream.Stream; public class LambdaIssues { public static void main(String[] args) { max(10, 11); Stream.of(1,2,3).filter(i -> i > 2).map(i -> i * 2).toArray(); } } Try to debug and evaluate Stream.of(1,2,3).filter(i -> i > 2).map(i -> i * 2).toArray() The evaluation fails with Evaluation failed. Reason(s): [The import java.lang.Math.max cannot be resolved] [The import java.lang.Math.max cannot be resolved]