diag: preserve envelope fields and reject JSON key collisions in tests
This commit is contained in:
1 parent
8ee0f4c2bf
commit
364eb57bbc
16 files changed
+166
-12
No files matched your search
@@ -16,6 +16,8 @@ Every verifier/compiler error has:
|
||||
|
||||
Code-specific `reason` values MUST be registered and stable; consumers MUST NOT derive them from human messages. E7006 requires the categories in spec 15 §10 and `reference/error-codes.md`.
|
||||
|
||||
Diagnostic JSON objects MUST have unique member names. Code-specific fields MUST NOT shadow envelope names (`code`, `kind`, `severity`, `file`, `line`, `col`, `message`, `repair_candidates`, `related_locations`). E3202 for an unsupported narrowing form and E7002 for an unknown capability kind use `capability_kind`; E2102 for unlock with a live guard borrow identifies `guard` and `borrow` separately. These fields change no rejection or primary-position rule.
|
||||
|
||||
`related_locations` MAY provide ordered, non-binding factual context; the covered forms below MUST provide exactly one record for the already selected conflict. Other forms MUST NOT invent a value or task.
|
||||
|
||||
| Diagnostic field | Related `role` | Related `value` | Position |
|
||||
|
||||
Reference in new issue
Block a user