diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java index 70dcc1618a3..3874cb9bcd1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java @@ -86,10 +86,10 @@ public class DependentValue implements IValue { @Override public boolean equals(Object obj) { - if (!(obj instanceof IntegralValue)) { + if (!(obj instanceof DependentValue)) { return false; } - final IntegralValue rhs = (IntegralValue) obj; + final DependentValue rhs = (DependentValue) obj; return CharArrayUtils.equals(getSignature(), rhs.getSignature()); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java index fd8a0b28a61..672970714e2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java @@ -581,7 +581,8 @@ public class ValueFactory { } private static boolean isDeferredValue(IValue value) { - return value instanceof IntegralValue && ((IntegralValue) value).numberValue() == null; + return value instanceof DependentValue || + (value instanceof IntegralValue && ((IntegralValue) value).numberValue() == null); } /**