-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Fix local and exported type alias merging #36237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run this on RWC and user tests before merging? DT seems unlikely to have this error.
@typescript-bot test this |
Heya @andrewbranch, I've started to run the extended test suite on this PR at 36e7c34. You can monitor the build here. It should now contribute to this PR's status checks. |
Heya @andrewbranch, I've started to run the parallelized community code test suite on this PR at 36e7c34. You can monitor the build here. It should now contribute to this PR's status checks. |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
User test changes look all unrelated |
There is one new error in RWC (Skype), but it looks expected and easily fixable. |
Fixes #36196
The error is weird, but it’s consistent with what you get for every other kind of declaration, including other non-merging declarations like constants. The way the binder works is a little strange; an exported declaration does have a local symbol but it doesn’t get any symbol flags, so anything can merge into it. On the other hand, it runs through
declareSymbol
with a normal, full set ofexcludes
flags, so it will not merge into something else—a strange asymmetry that means if you reverse the order of declarations such that the local-only comes first:you get the more expected “Duplicate identifier” error. It seems like there’s a potential to do some general work around making these collisions symmetrical in the binder, but it would be a much bigger and more dangerous change that can’t happen for 3.8 at this point.