Skip to content
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

GetSymbolInfo for ValueTuple<int,int> says the type has no locations #14524

Open
gafter opened this issue Oct 14, 2016 · 5 comments
Open

GetSymbolInfo for ValueTuple<int,int> says the type has no locations #14524

gafter opened this issue Oct 14, 2016 · 5 comments
Labels
Area-Compilers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. New Language Feature - Tuples Tuples
Milestone

Comments

@gafter
Copy link
Member

gafter commented Oct 14, 2016

When I reference the assembly that defines ValueTuple, and then instantiate it in source, the SemanticModel says that the type has no locations. In particular, it has no locations from metadata, and all (zero of) its locations are from source, so it appears at first glance to be from source.

We should confirm this is the intended behavior.

/cc @dpoeschl @jmarolf @CyrusNajmabadi @VSadov

@gafter gafter added Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Area-Compilers New Language Feature - Tuples Tuples labels Oct 14, 2016
@gafter gafter added this to the 2.0 (RTM) milestone Oct 14, 2016
@dpoeschl
Copy link
Contributor

dpoeschl commented Oct 14, 2016

@gafter On second validation, it looks like there are no locations in this case, which surprises Rename into crashing since it was invoked on a token and it expected that token to be a location of the symbol.

@gafter gafter changed the title GetSymbolInfo for ValueTuple<int,int> says the type is from source GetSymbolInfo for ValueTuple<int,int> says the type has no locations Oct 14, 2016
@gafter
Copy link
Member Author

gafter commented Oct 14, 2016

@dpoeschl Why would you expect that to be a location for the symbol? Did the semantic model report that as a declaration point for the type (i.e. GetDeclaredSymbol returning something)?

@dpoeschl
Copy link
Contributor

dpoeschl commented Oct 14, 2016

@gafter No, GetDeclaredSymbol didn't return anything. It shouldn't be a Location of the symbol in this case.

What I meant to say was: For symbols that have no Locations in metadata, it expected the token to be a Location of the symbol returned by GetSymbolInfo when called on that token. This is no longer the case. Maybe it was a faulty assumption all along and there are other examples where this falls down, we've just never hit them...

@jaredpar
Copy link
Member

What is the impact of this bug in the current state of the product? Need to understand if it still meets the RTM bar.

@VSadov VSadov modified the milestones: 2.1, 2.0 (RTM) Jan 17, 2017
@jaredpar jaredpar modified the milestones: 15.3, 15.1 Mar 9, 2017
@jaredpar jaredpar modified the milestones: 15.later, 15.3 Mar 27, 2017
@gafter
Copy link
Member Author

gafter commented Sep 15, 2017

This would likely be fixed as a side-effect of the changes proposed for #20648

@jaredpar jaredpar modified the milestones: 15.6, 16.0 Jan 4, 2018
@VSadov VSadov removed the 3 - Working label Jan 4, 2018
@jinujoseph jinujoseph modified the milestones: 16.0, 16.3 Jun 9, 2019
@jcouv jcouv modified the milestones: 16.3, Compiler.Next Jul 8, 2019
@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. New Language Feature - Tuples Tuples
Projects
None yet
Development

No branches or pull requests

6 participants