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

Analyze ref declarations/assignments/foreachs/returns (#33869)

上级 54ab7318
......@@ -284,23 +284,6 @@ internal static bool IsTypeOrValueExpression(BoundExpression expression)
}
}
private static bool IsLegalSuppressionValueKind(BindValueKind valueKind)
{
// Need to review allowed uses of the suppression operator
// Tracked by https://github.com/dotnet/roslyn/issues/31297
switch (valueKind)
{
case BindValueKind.RValue:
case BindValueKind.RValueOrMethodGroup:
case BindValueKind.RefOrOut:
return true;
}
// all others are illegal
return false;
}
/// <summary>
/// The purpose of this method is to determine if the expression satisfies desired capabilities.
/// If it is not then this code gives an appropriate error message.
......@@ -323,12 +306,6 @@ internal bool CheckValueKind(SyntaxNode node, BoundExpression expr, BindValueKin
return false;
}
if (expr.IsSuppressed && !IsLegalSuppressionValueKind(valueKind))
{
Error(diagnostics, ErrorCode.ERR_IllegalSuppression, node);
return false;
}
switch (expr.Kind)
{
// we need to handle properties and event in a special way even in an RValue case because of getters
......
......@@ -238,12 +238,12 @@ private BoundExpression BindArgListOperator(InvocationExpressionSyntax node, Dia
// Either we have a dynamic method group invocation "dyn.M(...)" or
// a dynamic delegate invocation "dyn(...)" -- either way, bind it as a dynamic
// invocation and let the lowering pass sort it out.
reportSuppressionIfPresent();
ReportSuppressionIfNeeded(boundExpression, diagnostics);
result = BindDynamicInvocation(node, boundExpression, analyzedArguments, ImmutableArray<MethodSymbol>.Empty, diagnostics, queryClause);
}
else if (boundExpression.Kind == BoundKind.MethodGroup)
{
reportSuppressionIfPresent();
ReportSuppressionIfNeeded(boundExpression, diagnostics);
result = BindMethodGroupInvocation(
node, expression, methodName, (BoundMethodGroup)boundExpression, analyzedArguments,
diagnostics, queryClause, allowUnexpandedForm: allowUnexpandedForm, anyApplicableCandidates: out _);
......@@ -270,14 +270,6 @@ private BoundExpression BindArgListOperator(InvocationExpressionSyntax node, Dia
CheckRestrictedTypeReceiver(result, this.Compilation, diagnostics);
return result;
void reportSuppressionIfPresent()
{
if (boundExpression.IsSuppressed)
{
Error(diagnostics, ErrorCode.ERR_IllegalSuppression, boundExpression.Syntax);
}
}
}
private BoundExpression BindDynamicInvocation(
......
......@@ -18,6 +18,7 @@ private BoundExpression BindCompoundAssignment(AssignmentExpressionSyntax node,
node.Left.CheckDeconstructionCompatibleArgument(diagnostics);
BoundExpression left = BindValue(node.Left, diagnostics, GetBinaryAssignmentKind(node.Kind()));
ReportSuppressionIfNeeded(left, diagnostics);
BoundExpression right = BindValue(node.Right, diagnostics, BindValueKind.RValue);
BinaryOperatorKind kind = SyntaxKindToBinaryOperatorKind(node.Kind());
......@@ -2105,6 +2106,7 @@ private static void BindPointerIndirectionExpressionInternal(CSharpSyntaxNode no
private BoundExpression BindAddressOfExpression(PrefixUnaryExpressionSyntax node, DiagnosticBag diagnostics)
{
BoundExpression operand = BindValue(node.Operand, diagnostics, BindValueKind.AddressOf);
ReportSuppressionIfNeeded(operand, diagnostics);
bool hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
bool isFixedStatementAddressOfExpression = SyntaxFacts.IsFixedStatementExpression(node);
......@@ -2283,6 +2285,14 @@ private BoundExpression BindUnaryOperator(PrefixUnaryExpressionSyntax node, Diag
return constant ?? BindUnaryOperatorCore(node, node.OperatorToken.Text, operand, diagnostics);
}
private void ReportSuppressionIfNeeded(BoundExpression expr, DiagnosticBag diagnostics)
{
if (expr.IsSuppressed)
{
Error(diagnostics, ErrorCode.ERR_IllegalSuppression, expr.Syntax);
}
}
private BoundExpression BindUnaryOperatorCore(CSharpSyntaxNode node, string operatorText, BoundExpression operand, DiagnosticBag diagnostics)
{
UnaryOperatorKind kind = SyntaxKindToUnaryOperatorKind(node.Kind());
......@@ -3569,6 +3579,7 @@ private BoundExpression BindNullCoalescingOperator(BinaryExpressionSyntax node,
private BoundExpression BindNullCoalescingAssignmentOperator(AssignmentExpressionSyntax node, DiagnosticBag diagnostics)
{
BoundExpression leftOperand = BindValue(node.Left, diagnostics, BindValueKind.CompoundAssignment);
ReportSuppressionIfNeeded(leftOperand, diagnostics);
BoundExpression rightOperand = BindValue(node.Right, diagnostics, BindValueKind.RValue);
// If either operand is bad, bail out preventing more cascading errors
......
......@@ -586,6 +586,7 @@ private BoundExpressionStatement BindExpressionStatement(CSharpSyntaxNode node,
BoundExpressionStatement expressionStatement;
var expression = BindValue(syntax, diagnostics, BindValueKind.RValue);
ReportSuppressionIfNeeded(expression, diagnostics);
if (!allowsAnyExpression && !IsValidStatementExpression(syntax, expression))
{
if (!node.HasErrors)
......@@ -1324,6 +1325,7 @@ private BoundExpression BindAssignment(AssignmentExpressionSyntax node, Diagnost
}
var op1 = BindValue(node.Left, diagnostics, lhsKind);
ReportSuppressionIfNeeded(op1, diagnostics);
var lhsRefKind = RefKind.None;
// If the LHS is a ref (not ref-readonly), the rhs
......
......@@ -15017,7 +15017,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to Argument of type &apos;{0}&apos; cannot be used as an input of type &apos;{1}&apos; for parameter &apos;{2}&apos; in &apos;{3}&apos; due to differences in the nullability of reference types..
/// Looks up a localized string similar to Argument of type &apos;{0}&apos; cannot be used for parameter &apos;{2}&apos; of type &apos;{1}&apos; in &apos;{3}&apos; due to differences in the nullability of reference types..
/// </summary>
internal static string WRN_NullabilityMismatchInArgument {
get {
......@@ -15026,7 +15026,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to Argument cannot be used as an input for parameter due to differences in the nullability of reference types..
/// Looks up a localized string similar to Argument cannot be used for parameter due to differences in the nullability of reference types..
/// </summary>
internal static string WRN_NullabilityMismatchInArgument_Title {
get {
......
......@@ -5422,10 +5422,10 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<value>A null literal introduces a null value for a type parameter.</value>
</data>
<data name="WRN_NullabilityMismatchInArgument" xml:space="preserve">
<value>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</value>
<value>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</value>
</data>
<data name="WRN_NullabilityMismatchInArgument_Title" xml:space="preserve">
<value>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</value>
<value>Argument cannot be used for parameter due to differences in the nullability of reference types.</value>
</data>
<data name="WRN_NullabilityMismatchInArgumentForOutput" xml:space="preserve">
<value>Argument of type '{0}' cannot be used as an output of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</value>
......
......@@ -1169,7 +1169,15 @@ protected override BoundNode VisitReturnStatementNoAdjust(BoundReturnStatement n
if (_returnTypesOpt == null &&
TryGetReturnType(out TypeSymbolWithAnnotations returnType))
{
VisitOptionalImplicitConversion(expr, returnType, useLegacyWarnings: false, AssignmentKind.Return);
if (node.RefKind == RefKind.None)
{
VisitOptionalImplicitConversion(expr, returnType, useLegacyWarnings: false, AssignmentKind.Return);
}
else
{
// return ref expr;
VisitRefExpression(expr, returnType);
}
}
else
{
......@@ -1183,6 +1191,28 @@ protected override BoundNode VisitReturnStatementNoAdjust(BoundReturnStatement n
return null;
}
private TypeWithState VisitRefExpression(BoundExpression expr, TypeSymbolWithAnnotations destinationType)
{
Visit(expr);
TypeWithState resultType = ResultType;
if (!expr.IsSuppressed && RemoveConversion(expr, includeExplicitConversions: false).expression.Kind != BoundKind.ThrowExpression)
{
var lvalueResultType = LvalueResultType;
if (IsNullabilityMismatch(lvalueResultType, destinationType))
{
// declared types must match
ReportNullabilityMismatchInAssignment(expr.Syntax, lvalueResultType, destinationType);
}
else
{
// types match, but state would let a null in
ReportNullableAssignmentIfNecessary(expr, destinationType, resultType, useLegacyWarnings: false);
}
}
return resultType;
}
private bool TryGetReturnType(out TypeSymbolWithAnnotations type)
{
var method = (MethodSymbol)_symbol;
......@@ -1238,18 +1268,26 @@ public override BoundNode VisitLocalDeclaration(BoundLocalDeclaration node)
bool inferredType = node.DeclaredType.InferredType;
TypeSymbolWithAnnotations type = local.Type;
TypeWithState valueType = VisitOptionalImplicitConversion(initializer, targetTypeOpt: inferredType ? default : type, useLegacyWarnings: true, AssignmentKind.Assignment);
if (inferredType)
TypeWithState valueType;
if (local.IsRef)
{
valueType = VisitRefExpression(initializer, type);
}
else
{
if (valueType.HasNullType)
valueType = VisitOptionalImplicitConversion(initializer, targetTypeOpt: inferredType ? default : type, useLegacyWarnings: true, AssignmentKind.Assignment);
if (inferredType)
{
Debug.Assert(type.IsErrorType());
valueType = type.ToTypeWithState();
}
if (valueType.HasNullType)
{
Debug.Assert(type.IsErrorType());
valueType = type.ToTypeWithState();
}
type = valueType.ToTypeSymbolWithAnnotations();
_variableTypes[local] = type;
type = valueType.ToTypeSymbolWithAnnotations();
_variableTypes[local] = type;
}
}
TrackNullableStateForAssignment(initializer, type, slot, valueType, MakeSlot(initializer));
......@@ -2836,6 +2874,9 @@ void visitArgumentEvaluateAndUnsplit(int argumentIndex, bool assertsTrue, bool a
VisitResult result,
bool extensionMethodThisArgument)
{
// Note: we allow for some variance in `in` and `out` cases. Unlike in binding, we're not
// limited by CLR constraints.
var resultType = result.RValueType;
bool reported = false;
switch (refKind)
......@@ -2861,20 +2902,31 @@ void visitArgumentEvaluateAndUnsplit(int argumentIndex, bool assertsTrue, bool a
{
if (!argument.IsSuppressed)
{
reported = ReportNullableAssignmentIfNecessary(argument, parameterType, resultType,
useLegacyWarnings: false, AssignmentKind.Argument, target: parameter);
if (!reported)
var lvalueResultType = result.LValueType;
if (IsNullabilityMismatch(lvalueResultType, parameterType))
{
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
if (!_conversions.HasIdentityOrImplicitReferenceConversion(resultType.Type, parameterType.TypeSymbol, ref useSiteDiagnostics))
{
ReportNullabilityMismatchInArgument(argument, resultType.Type, parameter, parameterType.TypeSymbol, forOutput: false);
reported = true;
}
// declared types must match
ReportNullabilityMismatchInRefArgument(argument, argumentType: lvalueResultType, parameter, parameterType);
}
else
{
// types match, but state would let a null in
ReportNullableAssignmentIfNecessary(argument, parameterType, resultType, useLegacyWarnings: false);
}
}
// Check assignment from a fictional value from the parameter to the argument.
var parameterWithState = parameterType.ToTypeWithState();
if (argument.IsSuppressed)
{
parameterWithState = parameterWithState.WithNotNullState();
}
var parameterValue = new BoundParameter(argument.Syntax, parameter);
var lValueType = result.LValueType;
TrackNullableStateForAssignment(parameterValue, lValueType, MakeSlot(argument), parameterWithState);
}
goto case RefKind.Out;
break;
case RefKind.Out:
{
var parameterWithState = parameterType.ToTypeWithState();
......@@ -2884,8 +2936,7 @@ void visitArgumentEvaluateAndUnsplit(int argumentIndex, bool assertsTrue, bool a
}
var lValueType = result.LValueType;
// The argument and the parameter may have different nested or top-level nullabilities,
// so we're going to check assignment from a fictional value from the parameter to the argument.
// Check assignment from a fictional value from the parameter to the argument.
var parameterValue = new BoundParameter(argument.Syntax, parameter);
if (!argument.IsSuppressed && !reported)
......@@ -4165,7 +4216,16 @@ public override BoundNode VisitAssignmentOperator(BoundAssignmentOperator node)
}
else
{
TypeWithState rightType = VisitOptionalImplicitConversion(right, leftLValueType, UseLegacyWarnings(left), AssignmentKind.Assignment);
TypeWithState rightType;
if (!node.IsRef)
{
rightType = VisitOptionalImplicitConversion(right, leftLValueType, UseLegacyWarnings(left), AssignmentKind.Assignment);
}
else
{
rightType = VisitRefExpression(right, leftLValueType);
}
TrackNullableStateForAssignment(right, leftLValueType, MakeSlot(left), rightType, MakeSlot(right));
SetResult(new TypeWithState(leftLValueType.TypeSymbol, rightType.State), leftLValueType);
}
......@@ -4604,6 +4664,14 @@ private void ReportArgumentWarnings(BoundExpression argument, TypeWithState argu
}
}
private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbolWithAnnotations argumentType, ParameterSymbol parameter, TypeSymbolWithAnnotations parameterType)
{
ReportSafetyDiagnostic(ErrorCode.WRN_NullabilityMismatchInArgument,
argument.Syntax, argumentType, parameterType,
new FormattedSymbol(parameter, SymbolDisplayFormat.ShortFormat),
new FormattedSymbol(parameter.ContainingSymbol, SymbolDisplayFormat.MinimallyQualifiedFormat));
}
/// <summary>
/// Report warning passing argument where nested nullability does not match
/// parameter (e.g.: calling `void F(object[] o)` with `F(new[] { maybeNull })`).
......@@ -4762,33 +4830,52 @@ protected override void VisitForEachExpression(BoundForEachStatement node)
public override void VisitForEachIterationVariables(BoundForEachStatement node)
{
// declare and assign all iteration variables
TypeSymbolWithAnnotations sourceType = node.EnumeratorInfoOpt?.ElementType ?? default;
TypeWithState sourceState = sourceType.ToTypeWithState();
foreach (var iterationVariable in node.IterationVariables)
{
TypeWithState sourceType = node.EnumeratorInfoOpt?.ElementType.ToTypeWithState() ?? default;
var state = NullableFlowState.NotNull;
if (!sourceType.HasNullType)
if (!sourceState.HasNullType)
{
TypeSymbolWithAnnotations destinationType = iterationVariable.Type;
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
Conversion conversion = _conversions.ClassifyImplicitConversionFromType(sourceType.Type, destinationType.TypeSymbol, ref useSiteDiagnostics);
TypeWithState result = ApplyConversion(
node.IterationVariableType,
operandOpt: null,
conversion,
destinationType,
sourceType,
checkConversion: false,
fromExplicitCast: false,
useLegacyWarnings: false,
AssignmentKind.Assignment,
reportTopLevelWarnings: false,
reportRemainingWarnings: false);
if (destinationType.IsReferenceType && destinationType.NullableAnnotation.IsAnyNotNullable() && result.MaybeNull)
if (iterationVariable.IsRef)
{
ReportNonSafetyDiagnostic(node.IterationVariableType.Syntax);
// foreach (ref DestinationType variable in collection)
if (IsNullabilityMismatch(sourceType, destinationType))
{
var foreachSyntax = (ForEachStatementSyntax)node.Syntax;
ReportNullabilityMismatchInAssignment(foreachSyntax.Type, sourceType, destinationType);
}
state = sourceState.State;
}
else
{
// foreach (DestinationType variable in collection)
// foreach (var variable in collection)
// foreach (var (..., ...) in collection)
// and asynchronous variants
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
Conversion conversion = _conversions.ClassifyImplicitConversionFromType(sourceType.TypeSymbol, destinationType.TypeSymbol, ref useSiteDiagnostics);
TypeWithState result = ApplyConversion(
node.IterationVariableType,
operandOpt: null,
conversion,
destinationType,
sourceState,
checkConversion: false,
fromExplicitCast: false,
useLegacyWarnings: false,
AssignmentKind.Assignment,
reportTopLevelWarnings: false,
reportRemainingWarnings: false);
if (destinationType.IsReferenceType && destinationType.NullableAnnotation.IsAnyNotNullable() && result.MaybeNull)
{
ReportNonSafetyDiagnostic(node.IterationVariableType.Syntax);
}
state = result.State;
state = result.State;
}
}
int slot = GetOrCreateSlot(iterationVariable);
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Typ odkazu s možnou hodnotou null v argumentu typu {0} neodpovídá cílovému typu {1} parametru {2} v {3}.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Typ odkazu s možnou hodnotou null v argumentu neodpovídá cílovému typu.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Die NULL-Zulässigkeit von Verweistypen im Argument vom Typ "{0}" entspricht nicht dem Zieltyp "{1}" für den Parameter "{2}" in "{3}".</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Die NULL-Zulässigkeit von Verweistypen im Argument entspricht nicht dem Zieltyp.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">La nulabilidad de los tipos de referencia del argumento de tipo "{0}" no coincide con el tipo de destino "{1}" para el parámetro "{2}" en "{3}".</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">La nulabilidad de los tipos de referencia del argumento no coincide con el tipo de destino</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">La nullabilité des types référence dans l'argument de type '{0}' ne correspond pas au type cible '{1}' pour le paramètre '{2}' dans '{3}'.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">La nullabilité des types référence dans l'argument ne correspond pas au type cible.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Il supporto dei valori Null dei tipi riferimento nell'argomento di tipo '{0}' non corrisponde al tipo di destinazione '{1}' per il parametro '{2}' in '{3}'.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Il supporto dei valori Null dei tipi riferimento nell'argomento non corrisponde al tipo di destinazione.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">'{0}' 型の引数における参照型の Null 許容性が、'{3}' 内のパラメーター '{2}' に関する対象の型 '{1}' と一致しません。</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">引数における参照型の Null 許容性が、対象の型と一致しません。</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">'{0}' 형식의 인수에 있는 참조 형식 Null 허용 여부가 '{3}'의 매개 변수 '{2}'에 대한 '{1}' 대상 형식과 일치하지 않습니다.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">인수에 있는 참조 형식 Null 허용 여부가 대상 형식과 일치하지 않습니다.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Obsługa wartości null dla typów referencyjnych w argumencie typu „{0}” jest niezgodna z typem docelowym „{1}” dla parametru „{2}” w „{3}”.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Obsługa wartości null dla typów referencyjnych w argumencie jest niezgodna z typem docelowym.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">A anulabilidade de tipos de referência em um argumento do tipo '{0}' não coincide com o tipo de destino '{1}' para o parâmetro '{2}' em '{3}'.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">A anulabilidade de tipos de referência no argumento não corresponde ao tipo de destino.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Допустимость значения NULL для ссылочных типов в аргументе типа "{0}" не соответствует целевому типу "{1}" для параметра "{2}" в "{3}".</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Допустимость значения NULL для ссылочных типов в аргументе не соответствует целевому типу.</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">'{0}' türündeki bağımsız değişken için başvuru türlerinin boş değer atanabilirliği, '{3}' içindeki '{2}' parametresi için '{1}' hedef türüyle eşleşmiyor.</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">Bağımsız değişkendeki başvuru türlerinin boş değer atanabilirliği hedef tür ile eşleşmiyor.</target>
<note />
</trans-unit>
......
......@@ -1048,7 +1048,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">类型“{0}”的实参中引用类型的为 Null 性与“{3}”中形参“{2}”的目标类型“{1}”不匹配。</target>
<note />
</trans-unit>
......@@ -1063,7 +1063,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">参数中的引用类型的为 Null 性与目标类型不匹配。</target>
<note />
</trans-unit>
......
......@@ -1343,7 +1343,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument">
<source>Argument of type '{0}' cannot be used as an input of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types.</source>
<source>Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">型別 '{0}' 的引數中參考型別可 Null 性與 '{3}' 中參數 '{2}' 的目標型別 '{1}' 不符合。</target>
<note />
</trans-unit>
......@@ -1358,7 +1358,7 @@
<note />
</trans-unit>
<trans-unit id="WRN_NullabilityMismatchInArgument_Title">
<source>Argument cannot be used as an input for parameter due to differences in the nullability of reference types.</source>
<source>Argument cannot be used for parameter due to differences in the nullability of reference types.</source>
<target state="needs-review-translation">引數中參考型別的可 Null 性與目標型別不符合。</target>
<note />
</trans-unit>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册