Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): update dependency org.eclipse.jdt:org.eclipse.jdt.core to v3.40.0 #6087

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/spoon/support/compiler/jdt/JDTTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,10 @@ public void endVisit(TypePattern anyPattern, BlockScope scope) {

@Override
public boolean visit(SwitchStatement switchStatement, BlockScope scope) {
// JDT 3.40.0 removes SwitchExpression#traverse method, so let's emulate it
if (switchStatement instanceof SwitchExpression switchExpression) {
return visit(switchExpression, scope);
}
context.enter(factory.Core().createSwitch(), switchStatement);
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/spoon/support/compiler/jdt/ParentExiter.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ public void visitCtBreak(CtBreak b) {
@Override
public <E> void visitCtCase(CtCase<E> caseStatement) {
final ASTNode node = jdtTreeBuilder.getContextBuilder().getCurrentNode();
if (node instanceof CaseStatement) {
caseStatement.setCaseKind(((CaseStatement) node).isExpr ? CaseKind.ARROW : CaseKind.COLON);
if (node instanceof CaseStatement cs) {
caseStatement.setCaseKind(cs.isSwitchRule ? CaseKind.ARROW : CaseKind.COLON);
}
if (shouldAddAsCaseExpression(caseStatement, node)) {
if (child instanceof CtPattern pattern) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public <T> void visitCtExecutableReference(
}
}

@GitHubIssue(issueNumber = 5977, fixed = false)
I-Al-Istannen marked this conversation as resolved.
Show resolved Hide resolved
@Test
public void testStackOverflow() {
Launcher launcher = new Launcher();
Expand Down
Loading