Uh oh!
There was an error while loading. Please reload this page.
Exclude enum/number compatibility rule from comparable relation - #42472
Conversation
Anders Hejlsberg (ahejlsberg)
commented
Jan 24, 2021
TypeScript Bot (@typescript-bot) test this |
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at fd1a4cb. You can monitor the build here. |
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the parallelized Definitely Typed test suite on this PR at fd1a4cb. You can monitor the build here. |
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the parallelized community code test suite on this PR at fd1a4cb. You can monitor the build here. |
TypeScript Bot (typescript-bot)
commented
Jan 24, 2021
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
Anders Hejlsberg (ahejlsberg)
commented
Jan 25, 2021
The only test changes related to this PR are some new errors in the RWC vscode project. All but one of them are flagging real issues. For example, code that declares something as a The one undesired new error is related to this enum declaration in vs/editor/common/modes.ts: /** * Open ended enum at runtime * @internal */exportconstenumLanguageId{Null=0,PlainText=1}The intent here is for exportconstenumLanguageId{Null=+0,PlainText=1}Subtle, but actually an intended and documented behavior. |
This seems like almost pure goodness, but I would still err on the side of saying that this can wait for 4.3. That |
What is the case for the non-union enum? It's unclear from that example. |
Let me know if https://github.com/microsoft/TypeScript/wiki/Breaking-Changes#union-enums-cannot-be-compared-to-any-number accurately reflects the change here. |
Anders Hejlsberg (ahejlsberg)
commented
Jan 25, 2021
The code that broke compares a value of type |
Anders Hejlsberg (ahejlsberg)
commented
Jan 25, 2021
Yes, looks good. |
Fixes#42442.