/// 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>
Diagnostic(ErrorCode.WRN_NullabilityMismatchInAssignment,"(default(object), default(int))").WithArguments("(object?, int)","(object a, int b)").WithLocation(11,32)
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;