Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow locations to be overridden when referring to a type
not sure of the cleanest way to achieve this, but where a type includes a location, a caller may wish to override it, such as in the default catalog references to template 2. previously i think locations in referenced types were just dropped (?) but then it was changed to be additive, which makes sense and is consistent, but breaks the examples and means there was no way to override a location in a referenced type. this changes it so that *if* a location block is included on the *referencer*, even if empty, it overrides the locations on the referenced type. examples are updated accordingly. an alternative would be to introduce a new explicit field to clear locations; or a very different alternative would be to put locations in comments in the examples, and clarify in the code templates/applications (as presently the presence of a location is what triggers something being editable!); those are worth considering, especially the latter, but the present change actually seems sensible as it is rare a caller would want to *add* a location to a referenced type!
- Loading branch information
Showing 3 changed files with 18 additions and 3 deletions.