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 922b663
Browse filesBrowse the repository at this point in the historyBrowse files
Why:
With the annotations printed, two declarations can still read the same
and not match, when a type they mention differs between the two sides,
e.g. a base class that the interface leaves abstract. The error then
showed the same text twice, which reads as a bug in the compiler. The
reasons now start with a note saying so, which replaces the lead-in of a
difference in runtime representation.
Diagnostic modified (declarations that print the same):
Example:
// Classes.res
@instanceof("Animal") type animal
@instanceof("Dog") type dog = private animal
// Classes.resi
type animal
@instanceof("Dog") type dog = private animal
Before (diagnostic):
Actual declaration (Classes.res:2:20-44):
@instanceof("Dog") type dog = private animal
Expected declaration (Classes.resi:2:20-44):
@instanceof("Dog") type dog = private animal
Their runtime representations differ:
Actual declaration: instances of Dog, a subclass of Animal
Expected declaration: instances of Dog
After (diagnostic):
Actual declaration (Classes.res:2:20-44):
@instanceof("Dog") type dog = private animal
Expected declaration (Classes.resi:2:20-44):
@instanceof("Dog") type dog = private animal
The declarations read the same, but a type they mention differs:
Actual declaration: instances of Dog, a subclass of Animal
Expected declaration: instances of Dog
Review: Why compare the printed text? It is what the reader sees, and the case to catch is exactly two declarations that look the same.
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