Skip to content

Demonstrate behavior of GetTypeInfo on 'var' in lambda#45541

Merged
RikkiGibson merged 2 commits intodotnet:masterfrom
RikkiGibson:gettypeinfo-var-lambda
Jun 30, 2020
Merged

Demonstrate behavior of GetTypeInfo on 'var' in lambda#45541
RikkiGibson merged 2 commits intodotnet:masterfrom
RikkiGibson:gettypeinfo-var-lambda

Conversation

@RikkiGibson
Copy link
Member

Related to #45398

Basically it seems like mostly we do give valid type info for a 'var' in a lambda, but we do not give nullability information when there is no valid conversion for the lambda. We may or may not wish to fix this, but it seemed worthwhile to demonstrate the current behavior in tests.

@RikkiGibson RikkiGibson requested a review from a team as a code owner June 29, 2020 23:34
@RikkiGibson RikkiGibson added the Test Test failures in roslyn-CI label Jun 29, 2020
333fred
333fred previously approved these changes Jun 30, 2020
Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

Yeah, this is to do with one of the places that we do error recovery, but don't then call the walker rewrite. I'm not sure it's a priority issue, but it would be good to fix at some point.

private static string s_data;
static void Main()
{
Action1 a = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Consider using a more obviously-bad name like "NonexistantDelegateType". Also consider adding tests for when the delegate type exists but is mismatched.

@333fred 333fred dismissed their stale review June 30, 2020 01:17

Meant to click comment, not approve. Sorry

@RikkiGibson RikkiGibson merged commit 15dfa03 into dotnet:master Jun 30, 2020
@ghost ghost added this to the Next milestone Jun 30, 2020
@RikkiGibson RikkiGibson deleted the gettypeinfo-var-lambda branch June 30, 2020 17:33
@JoeRobich JoeRobich modified the milestones: Next, 16.8.P1 Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Nullable Semantic Model Nullable Semantic Model Issues Test Test failures in roslyn-CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants