Name a drawGroup only on a field that splits the pair, and a field around a reference
This commit is contained in:
+8
-4
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user