Skip to content

Do not blindly cast to IndexedClassDecl while reassigning anonymous c…#2170

Merged
jlahoda merged 1 commit intoapache:masterfrom
jlahoda:no-blind-cast-to-indexedclass
Jun 14, 2020
Merged

Do not blindly cast to IndexedClassDecl while reassigning anonymous c…#2170
jlahoda merged 1 commit intoapache:masterfrom
jlahoda:no-blind-cast-to-indexedclass

Conversation

@jlahoda
Copy link
Copy Markdown
Contributor

@jlahoda jlahoda commented Jun 8, 2020

…lass numbers, as the class decl may not be IndexedClassDecl.

While running on current JDK 15 without nb-javac, the parser produces ordinary JCClassDecl, not IndexedClassDecl, and then the casts to IndexedClassDecl fail, and various tests (like code completion tests) fail due to this.

Eventually, we probably want to get rid of IndexedClassDecls altogether, but more testing will be needed for that.

Added also a related test to partial reparse test, to verify things work reasonably during partial reparse.

…lass numbers, as the class decl may not be IndexedClassDecl.
@jlahoda jlahoda added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Jun 8, 2020
@arvindaprameya
Copy link
Copy Markdown

+1 Approved, Thanks for doing this Jan.

Copy link
Copy Markdown
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Thanks.

@jlahoda jlahoda merged commit aa266cb into apache:master Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants