diff --git a/proptools/configurable.go b/proptools/configurable.go index 452289d..bd98fdc 100644 --- a/proptools/configurable.go +++ b/proptools/configurable.go @@ -467,6 +467,7 @@ func (c *singleConfigurable[T]) evaluateNonTransitive(propertyName string, evalu values[i] = evaluator.EvaluateConfiguration(condition, propertyName) } foundMatch := false + nonMatchingIndex := 0 var result *T for _, case_ := range c.cases { allMatch := true @@ -477,6 +478,7 @@ func (c *singleConfigurable[T]) evaluateNonTransitive(propertyName string, evalu } if !pat.matchesValue(values[i]) { allMatch = false + nonMatchingIndex = i break } } @@ -488,7 +490,8 @@ func (c *singleConfigurable[T]) evaluateNonTransitive(propertyName string, evalu if foundMatch { return result } - evaluator.PropertyErrorf(propertyName, "%s had value %s, which was not handled by the select statement", c.conditions, values) + + evaluator.PropertyErrorf(propertyName, "%s had value %s, which was not handled by the select statement", c.conditions[nonMatchingIndex].String(), values[nonMatchingIndex].String()) return nil }