Revert change to type print in an error message#61977
Revert change to type print in an error message#61977jakebailey merged 1 commit intomicrosoft:mainfrom
Conversation
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
1 similar comment
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
There was a problem hiding this comment.
Pull Request Overview
This PR reverts a change introduced in PR #60631 that modified the error message regarding property overrides. The update restores the expected error messages across test baselines and adjusts the diagnostic formatting in the compiler checker.
- Reverts error messages in propertyOverridesAccessors6.errors.txt to reference class 'B'
- Reverts error messages in accessorsOverrideProperty10.errors.txt to reference class 'B'
- Reverts the type printing parameter in src/compiler/checker.ts to use baseType
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/baselines/reference/propertyOverridesAccessors6.errors.txt | Updated error message now references class 'B' |
| tests/baselines/reference/accessorsOverrideProperty10.errors.txt | Updated error message now references class 'B' |
| src/compiler/checker.ts | Reverted type printing change by replacing getDeclaredTypeOfSymbol(base.parent!) with baseType |
Comments suppressed due to low confidence (3)
tests/baselines/reference/propertyOverridesAccessors6.errors.txt:1
- Ensure that the error message correctly refers to class 'B' for the accessor override, matching the intended design of the diagnostic.
propertyOverridesAccessors6.ts(8,3): error TS2610: 'x' is defined as an accessor in class 'B', but is overridden here in 'C' as an instance property.
tests/baselines/reference/accessorsOverrideProperty10.errors.txt:1
- Align the error message in this baseline with the reversion by referencing class 'B' consistently for the accessor override.
accessorsOverrideProperty10.ts(6,7): error TS2611: 'x' is defined as a property in class 'B', but is overridden here in 'C' as an accessor.
reverts part #60631 that wasn't needed for that fix