File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11/*******************************************************************************
2- * Copyright (c) 2000, 2023 IBM Corporation and others.
2+ * Copyright (c) 2000, 2024 IBM Corporation and others.
33 *
44 * This program and the accompanying materials
55 * are made available under the terms of the Eclipse Public License 2.0
@@ -2017,8 +2017,13 @@ public boolean visit(TypeParameter node) {
20172017
20182018 @ Override
20192019 public boolean visit (TypePattern node ) {
2020- if (ASTHelper .isPatternSupported (node .getAST ())) {
2021- node .getPatternVariable ().accept (this );
2020+ AST ast = node .getAST ();
2021+ if (ASTHelper .isPatternSupported (ast )) {
2022+ if (ast .apiLevel () >= ASTHelper .JLS22 ) {
2023+ node .getPatternVariable2 ().accept (this );
2024+ } else {
2025+ node .getPatternVariable ().accept (this );
2026+ }
20222027 }
20232028 return false ;
20242029 }
You can’t perform that action at this time.
0 commit comments