1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 04:45:38 +02:00

Fix type of value-dependent fold expression evaluation

This commit is contained in:
Igor V. Kovalenko 2023-03-06 01:15:37 +03:00 committed by Jonah Graham
parent 4b4daec3b4
commit a5d51f2def

View file

@ -84,9 +84,6 @@ public class EvalFoldExpression extends CPPDependentEvaluation {
@Override
public boolean isTypeDependent() {
if (fType != null) {
return fType instanceof TypeOfDependentExpression;
}
return containsDependentType(fPackEvals) || (fInitEval != null && fInitEval.isTypeDependent());
}
@ -122,7 +119,7 @@ public class EvalFoldExpression extends CPPDependentEvaluation {
@Override
public IType getType() {
if (fType == null) {
if (isTypeDependent()) {
if (isTypeDependent() || isValueDependent()) {
fType = new TypeOfDependentExpression(this);
} else {
fType = computeEvaluation().getType();