Skip to content

Conversation

@333fred
Copy link
Member

@333fred 333fred commented Jun 27, 2019

@dotnet/roslyn-compiler @chsienki for review. /cc @jasonmalinowski @ryzngard

Fixes #35037

@333fred 333fred requested review from a team and chsienki June 27, 2019 18:37
@jcouv jcouv added this to the 16.3.P2 milestone Jun 27, 2019
Copy link
Member

@chsienki chsienki Jun 27, 2019

Choose a reason for hiding this comment

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

Do we actually use this property in a lot of places? Properties with big side effects make me nervous. If its only used in one or two places, consider not calling EnsureRootBoundForNullabilityIfNecessary leaving it to the caller instead, and just assert that _lazySnapshotmanager is populated. #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

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

It's used in derived classes, so I'd prefer to keep the field private. I will change this to a method though, so the side effects aren't unexpected.


In reply to: 298375705 [](ancestors = 298375705)

Copy link
Member

@chsienki chsienki left a comment

Choose a reason for hiding this comment

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

:shipit:

@333fred 333fred force-pushed the getspeculativetypeinfo branch from fd0b9f6 to dc39452 Compare June 28, 2019 20:17
@333fred
Copy link
Member Author

333fred commented Jun 28, 2019

@dotnet/roslyn-compiler for a second review. #Closed

/// <summary>
/// Only used when this is a speculative semantic model.
/// </summary>
private NullableWalker.SnapshotManager _parentSnapshotManagerOpt;
Copy link
Contributor

@cston cston Jun 28, 2019

Choose a reason for hiding this comment

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

private [](start = 8, length = 7)

readonly #Resolved

}

protected NullableWalker.SnapshotManager SnapshotManager
// We hide this property, as EnsureRootBoundForNullabilityIfNecessary can cause
Copy link
Contributor

@cston cston Jun 28, 2019

Choose a reason for hiding this comment

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

We hide this property, as [](start = 11, length = 25)

This is a little confusing since this member is not a property and not hidden. Perhaps "Not a property because ...". #Resolved

}

private static BoundExpression GetSpeculativelyBoundExpressionHelper(Binder binder, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, DiagnosticBag diagnostics)
protected static BoundExpression GetSpeculativelyBoundExpressionHelper(Binder binder, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, DiagnosticBag diagnostics)
Copy link
Contributor

@cston cston Jun 28, 2019

Choose a reason for hiding this comment

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

protected [](start = 8, length = 9)

Is this change needed? #Resolved

@cston
Copy link
Contributor

cston commented Jun 28, 2019

        private readonly ImmutableArray<SharedWalkerState> _walkerGlobalStates;

"Shared" here and throughout this file? #Resolved


Refers to: src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.SnapshotManager.cs:20 in dc39452. [](commit_id = dc39452, deletion_comment = False)

@333fred 333fred merged commit 98198ea into dotnet:master Jun 29, 2019
@333fred 333fred deleted the getspeculativetypeinfo branch June 29, 2019 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable nullable analysis on speculative semantic models

4 participants