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

Invalid keyword recommender tests after #15049 #15523

Closed
gafter opened this issue Nov 24, 2016 · 3 comments
Closed

Invalid keyword recommender tests after #15049 #15523

gafter opened this issue Nov 24, 2016 · 3 comments
Assignees
Labels
Area-Compilers Area-IDE Bug New Language Feature - Tuples Tuples Resolution-Not Reproducible The described behavior could not be reproduced by developers
Milestone

Comments

@gafter
Copy link
Member

gafter commented Nov 24, 2016

We are preparing in #15049 for the ability to declare variables in a deconstruction in an expression. As a consequence, in the future you would be able to write

var q = (int a, int b) = e;

Note that this is not a lambda expression, but a deconstruction assignment in the initializer of q. So inside the parens, neither ref nor out would be permitted.

Since the parser is changing to support this, two existing keyword recommender tests are invalidated by this: RefKeywordRecommenderTests.TestInLambdaDeclaration3 and OutKeywordRecommenderTests.TestInLambdaDeclaration3. I am marking them skipped with this issue until we can decide what to do about them.

@CyrusNajmabadi
Copy link
Member

So inside the parens, neither ref nor out would be permitted.

Intuitively, IntelliSense takes a "left valid" view of the world. in other words, it makes its decisions based on the code that has come before (and is therefore more 'complete') and ignored what comes after (as that is being changes/written).

In a case like this, ref/out shoud be recommended, because when you have something like:

var q = (int a, $$ then you could definitely be in the middle of writing a lambda. We shouldn't take the code to the right to make an errant determination here.

--

Note: Making htis work should be very trivial. All logic for this sort of thing will be in the RefKeywordRecommender and OutKeywordRecommender. Updating them accordingly should be easy.

@gafter
Copy link
Member Author

gafter commented Nov 25, 2016

OK, I'll fix the recommender and make the test work rather than skipping the test.

@gafter gafter closed this as completed Nov 25, 2016
@gafter gafter added the Resolution-Not Reproducible The described behavior could not be reproduced by developers label Nov 25, 2016
@CyrusNajmabadi
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Area-IDE Bug New Language Feature - Tuples Tuples Resolution-Not Reproducible The described behavior could not be reproduced by developers
Projects
None yet
Development

No branches or pull requests

2 participants