Skip to content

Commit

Permalink
Fix type of value-dependent fold expression evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
i-garrison authored and jonahgraham committed Mar 16, 2023
1 parent 4b4daec commit a5d51f2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public boolean isFunctionSet() {

@Override
public boolean isTypeDependent() {
if (fType != null) {
return fType instanceof TypeOfDependentExpression;
}
return containsDependentType(fPackEvals) || (fInitEval != null && fInitEval.isTypeDependent());
}

Expand Down Expand Up @@ -122,7 +119,7 @@ private boolean computeIsConstantExpression() {
@Override
public IType getType() {
if (fType == null) {
if (isTypeDependent()) {
if (isTypeDependent() || isValueDependent()) {
fType = new TypeOfDependentExpression(this);
} else {
fType = computeEvaluation().getType();
Expand Down

0 comments on commit a5d51f2

Please sign in to comment.