Community
Participate
Working Groups
In a conditional block, immediately before a cast expression content assist is incomplete: public class Cast { Object field; void test(Object o) { if (true) { | // content assist here does not offer o or field ((String) o).toCharArray(); } } } Without the conditional block or after the cast, content assist correctly offers o and field. Tested in Version: 2021-09 (4.21) Build id: I20210629-1800 4.19 works correctly.
Yep, I see it in I20210706-1800 too, that contains bug 574267 fix.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182908
(In reply to Eclipse Genie from comment #2) > New Gerrit change created: > https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182908 The cast was parsed as the argument of a message send (empty selector). Let's simply detect this situation and switch to proposing any variables or methods as an assumed statement start.
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182908 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=1131b538846df83fffb032675cb8fcf50e2ae90e
(In reply to Eclipse Genie from comment #4) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182908 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=1131b538846df83fffb032675cb8fcf50e2ae90e Released to master for 4.21 M2 Thanks, Julian, for reporting.
Verified with Eclipse 4.21 M3 Version: 2021-09 (4.21) Build id: I20210818-1800