未验证 提交 3b1a465f 编写于 作者: J Julien Couvreur 提交者: GitHub

Fix inference with ref parameter with maybe-null value (#47952)

上级 b7e71f04
......@@ -5797,9 +5797,8 @@ private ImmutableArray<BoundExpression> GetArgumentsForMethodTypeInference(Immut
{
var visitArgumentResult = argumentResults[i];
var lambdaState = visitArgumentResult.StateForLambda;
var argumentResult = visitArgumentResult.LValueType;
if (!argumentResult.HasType)
argumentResult = visitArgumentResult.RValueType.ToTypeWithAnnotations(compilation);
// Note: for `out` arguments, the argument result contains the declaration type (see `VisitArgumentEvaluate`)
var argumentResult = visitArgumentResult.RValueType.ToTypeWithAnnotations(compilation);
builder.Add(getArgumentForMethodTypeInference(arguments[i], argumentResult, lambdaState));
}
return builder.ToImmutableAndFree();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册