Community
Participate
Working Groups
Given //--- public class Bug { void test (Object o) { if (true) { Str ((String) o).toCharArray(); } } } //--- here Str cannot be completed to String, nor any type (B -> Bug). This doesn't happen when either the subsequent invocation or the enclosing if is removed. This was discovered in bug 574823, where removing one check in CompletionParser.fetchNextToken() accidentally fixed this issue: remove && this.expressionPtr <= -1
Still in I20210723-1800
(In reply to Andrey Loskutov from comment #1) > Still in I20210723-1800 sure :)
(In reply to Stephan Herrmann from comment #2) > (In reply to Andrey Loskutov from comment #1) > > Still in I20210723-1800 > > sure :) That was just a note fore me, because I've went over and validated all opened content assist bugs to see if some were fixed by latest changes. Some was, but not all :-)
Recovered AST: //--- public class Bug { public Bug() { } void test(Object o) { if (true) { <CompleteOnMessageSendName:Str()>.toCharArray(); } } } //--- Given that the CompletionOnMessageSendName actually has an argument "(String) o" (which just doesn't show in toString(), that AST is actually correct, though not totally desirable.
The fix for bug 574704 handled the situation in general, but forgot about types as the start of a statement.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183744
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183744 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=82df0cc7b95ecddb43047392b3f4b9e62defed0e
(In reply to Eclipse Genie from comment #7) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183744 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=82df0cc7b95ecddb43047392b3f4b9e62defed0e Released to master for 4.21 M3
Verified in I20210806-1800