/// Binds the provided expression in the given context.
/// </summary>
/// <param name="position">The position to bind at.</param>
/// <param name="expression">The expression to bind</param>
/// <param name="bindingOption">How to speculatively bind the given expression. If this is <see cref="SpeculativeBindingOption.BindAsTypeOrNamespace"/>
/// then the provided expression should be a <see cref="TypeSyntax"/>.</param>
/// <param name="binder">The binder that was used to bind the given syntax.</param>
/// <param name="crefSymbols">The symbols used in a cref. If this is not default, then the return is null.</param>
/// <returns>The expression that was bound. If <paramref name="crefSymbols"/> is not default, this is null.</returns>
Debug.Fail($"Did not find a snapshot for {node} `{node.Syntax}.`");
}
Debug.Assert(_walkerGlobalStates.Length>_incrementalSnapshots[position].snapshot.SharedStateIndex,$"Did not find global state for {node} `{node.Syntax}`.");
Debug.Assert(_walkerSharedStates.Length>_incrementalSnapshots[position].snapshot.SharedStateIndex,$"Did not find shared state for {node} `{node.Syntax}`.");
Diagnostic(ErrorCode.WRN_NullabilityMismatchInAssignment,"(default(object), default(int))").WithArguments("(object?, int)","(object a, int b)").WithLocation(11,32)
);
}
[Fact]
publicvoidSpeculativeGetTypeInfo_Basic()
{
varsource=@"
class C
{
static object? staticField = null;
object field = staticField is null ? new object() : staticField;