| Summary: | Erroneous compilation error when using multi-line lambda, ternary, and Collectors.joining() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jeremiah Orr <orr94> | ||||
| Component: | Core | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
| Status: | VERIFIED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jarthana, orr94 | ||||
| Version: | 4.5 | ||||||
| Target Milestone: | 4.6 M1 | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Works fine on master, possible duplicate of bug 463728. Please try with a more recent 4.6 version and reopen if the issue still occurs. *** This bug has been marked as a duplicate of bug 463728 *** Verified for 4.6 M4 with build I20151207-2000. |
Created attachment 256654 [details] Example source If I use Stream.map() with a multi-line block that returns with a ternary, then use collect(Collectors.joining()), I get the following compilation error: The method collect(Collector<? super Object,A,R>) in the type Stream<Object> is not applicable for the arguments (Collector<CharSequence,capture#1-of ?,String>) If I eliminate the ternary or use the single-line lambda shortcut syntax, there is no problem. I get no compilation errors when compiling with javac.