1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 388283 - ClassCastException in CPPASTFunctionCallExpression

This commit is contained in:
Marc-Andre Laperle 2012-11-06 23:05:58 -05:00
parent b9e2be2744
commit b004558b81

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others. * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -312,8 +312,8 @@ public class CPPASTFunctionCallExpression extends ASTNode
IBinding b= name.resolvePreBinding(); IBinding b= name.resolvePreBinding();
if (b instanceof IType) { if (b instanceof IType) {
ICPPEvaluation[] args= new ICPPEvaluation[fArguments.length]; ICPPEvaluation[] args= new ICPPEvaluation[fArguments.length];
for (int i = 1; i < args.length; i++) { for (int i = 0; i < args.length; i++) {
args[i]= ((ICPPASTExpression) fArguments[i]).getEvaluation(); args[i]= ((ICPPASTInitializerClause) fArguments[i]).getEvaluation();
} }
return new EvalTypeId((IType) b, args); return new EvalTypeId((IType) b, args);
} }