Make the compiler report the error payload of [@error_message ...] even in the event that the constrained location is a ghost. This better enables ppxes to insert [@error_message ...] themselves, as ppxes often create ghost locations.
Cross-linking with #1943 and #1954.
Most of this feature is a regression test. It's kind of finicky to get [@error_message ...] to work — it only works when certain syntactic constructs appears as the payload of the constraint. (E.g., it works for variants and not for identifiers — the explanation mechanism has an interaction with whether the construct is "inferred", and [@error_message ...] inherits that interaction.) So the test is fairly contrived.
Make the compiler report the error payload of
[@error_message ...]
even in the event that the constrained location is a ghost. This better enables ppxes to insert[@error_message ...]
themselves, as ppxes often create ghost locations.Cross-linking with #1943 and #1954.
Most of this feature is a regression test. It's kind of finicky to get
[@error_message ...]
to work — it only works when certain syntactic constructs appears as the payload of the constraint. (E.g., it works for variants and not for identifiers — the explanation mechanism has an interaction with whether the construct is "inferred", and[@error_message ...]
inherits that interaction.) So the test is fairly contrived.