diff --git a/readsurvey.go b/readsurvey.go index 11ae00f..c819800 100644 --- a/readsurvey.go +++ b/readsurvey.go @@ -356,9 +356,13 @@ func alternatives(a, b surveyAt) bool { } func overlapError(route surveyRoute, ref string, into pathRead) error { - apart := fmt.Sprintf("move {%s} into a field with a drawGroup", into.a.spelling) - if into.a.spelling != into.at.route.label { - apart = fmt.Sprintf("give %s a drawGroup", into.at.route.spelling) + apart := "" + switch { + case route.spelling == into.at.route.spelling: + case isRef(into.at.route.label): + apart = fmt.Sprintf(", or move {%s} into a field with a drawGroup", into.at.route.label) + default: + apart = fmt.Sprintf(", or give %s a drawGroup", into.at.route.spelling) } - return fmt.Errorf("%s renders its own draw of what %s reads a path through; name the fields you want instead, or %s", route.spelled(ref), into.at.route.spelled(into.a.spelling), apart) + return fmt.Errorf("%s renders its own draw of what %s reads a path through; name the fields you want instead%s", route.spelled(ref), into.at.route.spelled(into.a.spelling), apart) }