Skip to content

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Nov 4, 2024

fixes #60408

cc @iisaduan

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 4, 2024
]);
}
else if (isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) {
else if (!isGlobalType(checker, symbol) && isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is perfect but, at the very least, it's no worse than the previous version. The preceding branch already handles isInImport(decl) and those should always be moveable. So I just pushed the existing check further down the road so the preceding branch can kick in in the case that is being fixed here.

Copy link
Member

@iisaduan iisaduan Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewbranch What do you think of this vs #60173, I think it is the same bug

@iisaduan iisaduan requested a review from andrewbranch November 7, 2024 00:45
@typescript-bot typescript-bot added Fix Available A PR has been opened for this issue labels Nov 7, 2024
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Fix Available A PR has been opened for this issue For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Move to a new file" refactor was recently broken for some import names

3 participants