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

[Umbrella] Lambda parameter inference #11619

Open
16 of 20 tasks
jaredpar opened this issue May 27, 2016 · 8 comments
Open
16 of 20 tasks

[Umbrella] Lambda parameter inference #11619

jaredpar opened this issue May 27, 2016 · 8 comments
Labels
Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Feature Request Language-C#
Milestone

Comments

@jaredpar
Copy link
Member

jaredpar commented May 27, 2016

There are a number of issues reported against Roslyn where we are unable to provide Intellisense for, seemingly simple, lamda parameters. In many cases the same scenario worked in pre-Roslyn days. The root issue here is the compiler is unable to infer a target method / delegate given the partial information provided when typing.

Fixing this requires some changes to overload resolution (danger) and can de-volve into heuristics at times vs. hard rules. As such we're going to look at all of these issues together and make a wholistic change to this part of the compiler. This issue represents that with the individual bugs being tracked below.

Slightly related to these issues and included on this list is poor syntax error recovery. See

The Roslyn VB compiler has similar limitations, though its overload resolution implementation is not modeled after the C# implementation. See

@jaredpar jaredpar added this to the 2.0 (Preview 4) milestone May 27, 2016
@gafter gafter changed the title Lambda parameter influence [Umbrella] Lambda parameter influence Jun 2, 2016
@gafter gafter changed the title [Umbrella] Lambda parameter influence [Umbrella] Lambda parameter inference Jun 2, 2016
@pawchen
Copy link
Contributor

pawchen commented Jun 6, 2016

Please also check #5498 and #557

@gafter
Copy link
Member

gafter commented Jun 7, 2016

@DiryBoy Thank you so much for identifying those! I've created a fix for them in PR #11807.

@gafter
Copy link
Member

gafter commented Jun 26, 2016

@CyrusNajmabadi I still owe you #7536, but I'm placing this on the back burner for the moment while I work on patterns. Please let me know if you come to know of any further candidates for this list.

@jaredpar
Copy link
Member Author

Moving this out to 2.1 for now as it feels like we've hit the major points here.

Should we possibly just close this out?

@jaredpar jaredpar modified the milestones: 2.1, 2.0 (RC) Jul 18, 2016
@gafter
Copy link
Member

gafter commented Jul 19, 2016

Pushing it to 2.1 makes sense.

I'd prefer to keep this umbrella open as long as we have work to do. It keeps it on the burner (front or back) so we're aware that there is more to do. I'm fine with pushing it out every release (or two) until we think there isn't anything more we can do.

@CarlLeth
Copy link

I've added an issue that shows this problem in a different context, which I don't think is covered by the other linked issues: #16548

@gafter
Copy link
Member

gafter commented Feb 10, 2017

Removing #613 from the list because that isn't really a problem inferring the type of the parameter. It is a problem deciding which overload of the method (none of which work) to complain about in the error message.

@gafter
Copy link
Member

gafter commented Feb 7, 2018

Adding #24654 to this list.

@gafter gafter modified the milestones: 16.0, 16.1 Feb 26, 2019
@jcouv jcouv modified the milestones: 16.1, 16.2 Apr 23, 2019
@gafter gafter modified the milestones: 16.2, Backlog Jun 3, 2019
@gafter gafter removed their assignment Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Feature Request Language-C#
Projects
None yet
Development

No branches or pull requests

5 participants