mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 21:45:22 +02:00
Bug 423471 - ClassCastException in CPPASTTemplateIDAmbiguity
This commit is contained in:
parent
aa9dd95996
commit
1a4e509e0d
1 changed files with 15 additions and 1 deletions
|
@ -7,21 +7,25 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Nathan Ridge - Initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDecltypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
|
||||
import org.eclipse.cdt.core.parser.Keywords;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||
|
||||
/**
|
||||
* Implementation of ICPPASTDecltypeSpecifier.
|
||||
*/
|
||||
public class CPPASTDecltypeSpecifier extends ASTNode implements ICPPASTDecltypeSpecifier {
|
||||
public class CPPASTDecltypeSpecifier extends ASTNode
|
||||
implements ICPPASTDecltypeSpecifier, IASTAmbiguityParent {
|
||||
private ICPPASTExpression fDecltypeExpression;
|
||||
private char[] fSignature;
|
||||
|
||||
|
@ -78,4 +82,14 @@ public class CPPASTDecltypeSpecifier extends ASTNode implements ICPPASTDecltypeS
|
|||
public IBinding resolvePreBinding() {
|
||||
return resolveBinding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
if (child == fDecltypeExpression) {
|
||||
other.setPropertyInParent(child.getPropertyInParent());
|
||||
other.setParent(child.getParent());
|
||||
fDecltypeExpression = (ICPPASTExpression) other;
|
||||
fSignature = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue