Skip to content

Same references from different (but not found) modules #5551

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

Closed
jkillian opened this issue Nov 6, 2015 · 3 comments · Fixed by #55519
Closed

Same references from different (but not found) modules #5551

jkillian opened this issue Nov 6, 2015 · 3 comments · Fixed by #55519
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@jkillian
Copy link

jkillian commented Nov 6, 2015

If you have code like the following:

import { resolve as resolveUrl } from 'url';
import { resolve } from 'path';

getDocumentHighlights marks both references of resolve as the same if the modules 'url' and 'path' can't be found. However, if 'url' and 'path' can be found, it correctly differentiates between the two.

I know this is somewhat of an edge-case, but is this intended behavior? Or is it a bug?

@mhegazy
Copy link
Contributor

mhegazy commented Nov 6, 2015

they both given the same symbol (unknownSymbol), the find all references code will think they are because they also have the same name. we could exclude the unknownSymbol from this logic. but would not say it is a priority.

@mhegazy mhegazy added Help Wanted You can do this Bug A bug in TypeScript labels Nov 6, 2015
@mhegazy mhegazy added this to the Community milestone Nov 6, 2015
@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
@Andarist
Copy link
Contributor

Andarist commented Aug 2, 2023

I can't repro this using "Find all references" using this code:

import { resolve as resolveUrl } from "idontcare";
import { resolve } from "whatever";

So perhaps the issue could be assumed to be fixed, cc @jakebailey

@jakebailey
Copy link
Member

Thanks for checking; I bisected and this was fixed in e8c3d54, but it's not clear to me that this actually has a test and it'd be nice to have one via a fourslash baseline or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
5 participants