From 9cf92c012d81bdd8df60a51f7cbcdb4812544c46 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 29 Jan 2024 06:19:23 +0100 Subject: report inherit attr errors at the duplicate name previously we reported the error at the beginning of the binding block (for plain inherits) or the beginning of the attr list (for inherit-from), effectively hiding where exactly the error happened. this also carries over to runtime positions of attributes in sets as reported by unsafeGetAttrPos. we're not worried about this changing observable eval behavior because it *is* marked unsafe, and the new behavior is much more useful. (cherry picked from commit 1edd6fada53553b89847ac3981ac28025857ca02) Change-Id: I2f50eb9f3dc3977db4eb3e3da96f1cb37ccd5174 --- doc/manual/rl-next/inherit-error-positions.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/manual/rl-next/inherit-error-positions.md (limited to 'doc') diff --git a/doc/manual/rl-next/inherit-error-positions.md b/doc/manual/rl-next/inherit-error-positions.md new file mode 100644 index 000000000..643080e9e --- /dev/null +++ b/doc/manual/rl-next/inherit-error-positions.md @@ -0,0 +1,6 @@ +--- +synopsis: fix duplicate attribute error positions for `inherit` +prs: 9874 +--- + +When an inherit caused a duplicate attribute error the position of the error was not reported correctly, placing the error with the inherit itself or at the start of the bindings block instead of the offending attribute name. -- cgit v1.2.3