Special case must actually be special-cased

This commit is contained in:
Simon Cozens 2021-03-17 11:52:50 +00:00
parent 939962f858
commit 539b3cd71d

View File

@ -82,7 +82,10 @@ class VarLibMergeError(VarLibError):
details = f"\n\nThe problem is likely to be in {offender}:\n" details = f"\n\nThe problem is likely to be in {offender}:\n"
if cause["reason"] == VarLibMergeFailure.FoundANone: if cause["reason"] == VarLibMergeFailure.FoundANone:
details = details + f"{stack[0]}=={cause['got']}\n" details = details + f"{stack[0]}=={cause['got']}\n"
elif cause["reason"] == VarLibMergeFailure.ShouldBeConstant: elif (
cause["reason"] == VarLibMergeFailure.ShouldBeConstant
and stack[0] == ".FeatureCount"
):
# Common case # Common case
details = details + self._incompatible_features(offender_index) details = details + self._incompatible_features(offender_index)
elif "expected" in cause and "got" in cause: elif "expected" in cause and "got" in cause: