Repository navigation
Commit f29ecf7
Say what a declaration's values are when runtime representations differ
Why:
"The actual declaration states values whose typeof is "object"" reads
clumsily: a declaration doesn't state values. The reason now has the
values as its subject, with "are" for classes and arrays and "have" for a
typeof, as in the @typeof annotation it comes from.
Diagnostic modified (runtime representation reason):
Before (diagnostic):
Their runtime representations differ:
The actual declaration states values whose typeof is "object".
The expected declaration states values whose typeof is "string".
After (diagnostic):
Their runtime representations differ:
Values of the actual declaration have typeof "object".
Values of the expected declaration have typeof "string".
Mapping modified (what a declaration states, Ast_untagged_variants.describe_declared_values):
Before (representation):
@instanceof("Dog") ↦ instances of Dog
@instanceof("Dog") of a subclass ↦ instances of Dog, a subclass of Animal
arrays ↦ arrays
@typeof("string") ↦ values whose typeof is "string"
nothing ↦ no runtime class or typeof
After (representation):
@instanceof("Dog") ↦ are instances of Dog
@instanceof("Dog") of a subclass ↦ are instances of Dog, a subclass of Animal
arrays ↦ are arrays
@typeof("string") ↦ have typeof "string"
nothing ↦ have no stated class or typeof
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLpf7RN1MiRcubPgRn
Signed-off-by: Christoph Knittel <ck@cca.io>1 parent 7a1245e commit f29ecf7
7 files changed
Lines changed: 24 additions & 26 deletions
File tree
- compiler/ml
- tests/build_tests
- super_errors_multi/expected
- super_errors/expected
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
327 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
328 | 330 | | |
329 | | - | |
| 331 | + | |
330 | 332 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
251 | 248 | | |
252 | 249 | | |
253 | 250 | | |
| |||
397 | 394 | | |
398 | 395 | | |
399 | 396 | | |
400 | | - | |
401 | | - | |
| 397 | + | |
| 398 | + | |
402 | 399 | | |
403 | 400 | | |
404 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
0 commit comments