-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Error: Debug Failure. False expression: parameter should have errors when reporting errors #33732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jack-williams I thought you might be interested in this if you're looking for a fun bug |
@RyanCavanaugh Sure thing! Optimistically pinging @sandersn incase he has any immediate pointers. Note to self: this was introduced in fb50920 |
Not immediate, no. I introduced asserts in that commit to make sure the new changes I made didn't have any bad effects, and in fact the time a different assert failed, the problem was in my new code. (One of my PRs from about a month ago might be relevant.) But this could definitely have been an existing problem. You could introduce that assert into the release-3.6 branch to see whether it repros there. |
Fix is up at #33828 The root cause is a difference in error checking logic with and without Specifically the issue is that when When I've made the logic consistent to always compare against the optional type of the property. There is no type error in the example, and now no assertion failure. I think there is an argument to be made about whether an excess property error should be raised here, but I'd rather fix the assertion in a non-breaking way first. |
TypeScript Version: 3dd7b84
Code
Expected behavior: Compiles successfully in strict mode
Actual behavior: Asserts in strict mode (different asserts for F1 and F2)
Edit: current best guess is that checkRelatedTo should be true and that's why there's no error message. This seems to be related to excess-property checking (related to the fresh object literal at the call site and the index signature in the union).
The text was updated successfully, but these errors were encountered: