Skip to content

Unify and fix grob property type checks

Jean Abou Samra requested to merge jeanas/lilypond:type-checks into master

Type checking on grob properties is special because the property may be set to a callback, which should always be accepted, or to an unpure/pure container, of which both parts (pure and unpure) should be checked. There were two separate places where type checking on grob properties was performed, and both were buggy. context-property.cc (for overrides) was not checking that the property existed if the value was a callback. ly_grob_set_property_x had this bug too, and additionally failed to check for unpure-pure containers.

Fix this by moving the special handling of grob properties into type_check_assignment, which is the easiest way to have the value checked only after the property has been checked for existing, and use type_check_assignment directly in both call sites.

Fixes #6464 (closed), #6456 (closed)


Contains related cleanups.

Merge request reports