You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e819c19
Browse filesBrowse the repository at this point in the historyBrowse files
Label the two sides when runtime representations differ
Why:
"The actual declaration states values whose typeof is "object"" reads
clumsily: a declaration doesn't state values. The two lines now use the
labels of the declaration blocks above them, followed by what each side
states.
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:
Actual declaration: typeof "object"
Expected declaration: typeof "string"
Diagnostic modified (@notundefined reason):
Before (diagnostic):
Their runtime representations differ:
The expected declaration is @notundefined,
but the actual declaration can hold undefined.
After (diagnostic):
Their runtime representations differ:
Actual declaration: can hold undefined
Expected declaration: @notundefined
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") ↦ instances of Dog
@instanceof("Dog") of a subclass ↦ instances of Dog, a subclass of Animal
arrays ↦ arrays
@typeof("string") ↦ typeof "string"
nothing ↦ no stated class or typeof
Review: Where do the labels come from? From the side names the caller passes, without their article: "the actual" and "declaration" make "Actual declaration"; the type definition errors of Typedecl get "Original definition" and "This definition".
Review: Why no period? The lines are labels with a value, like the declaration labels, not sentences.
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>
0 commit comments