Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address more PROTOTYPE comments #72113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2882,9 +2882,6 @@ private ImmutableArray<IArgumentOperation> CreateDisposeArguments(MethodArgument
return ImmutableArray<IArgumentOperation>.Empty;
}

// PROTOTYPE(ParamsCollections): Adjust?
Debug.Assert(!patternDisposeInfo.Expanded || patternDisposeInfo.Method.GetParameters().Last().OriginalDefinition.Type.IsSZArray());

var args = DeriveArguments(
patternDisposeInfo.Method,
patternDisposeInfo.Arguments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1100,15 +1100,15 @@ private bool IsValidExtensionMethodSignature()
case RefKind.Ref:
case RefKind.In:
case RefKind.RefReadOnlyParameter:
return !parameter.IsParams; // PROTOTYPE(ParamsCollections): Test this code path
return !parameter.IsParams;
default:
return false;
}
}

private bool IsValidUserDefinedOperatorSignature(int parameterCount)
{
if (this.ReturnsVoid || this.IsGenericMethod || this.IsVararg || this.ParameterCount != parameterCount || this.IsParams()) // PROTOTYPE(ParamsCollections): Test this code path
if (this.ReturnsVoid || this.IsGenericMethod || this.IsVararg || this.ParameterCount != parameterCount || this.IsParams())
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected sealed override void MethodChecks(BindingDiagnosticBag diagnostics)

if (this.IsVararg && (IsGenericMethod || ContainingType.IsGenericType || _lazyParameters.Length > 0 && _lazyParameters[_lazyParameters.Length - 1].IsParams))
{
diagnostics.Add(ErrorCode.ERR_BadVarargs, location); // PROTOTYPE(ParamsCollections): Test this code path
diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ private static void PartialMethodChecks(SourceOrdinaryMethodSymbol definition, S
diagnostics.Add(ErrorCode.ERR_PartialMethodUnsafeDifference, implementation.GetFirstLocation());
}

if (definition.IsParams() != implementation.IsParams()) // PROTOTYPE(ParamsCollections): Test this code path
if (definition.IsParams() != implementation.IsParams())
{
diagnostics.Add(ErrorCode.ERR_PartialMethodParamsDifference, implementation.GetFirstLocation());
}
Expand Down Expand Up @@ -899,7 +899,7 @@ private void CheckModifiers(bool isExplicitInterfaceImplementation, Location loc
}
else if (isVararg && (IsGenericMethod || ContainingType.IsGenericType || Parameters.Length > 0 && Parameters[Parameters.Length - 1].IsParams))
{
diagnostics.Add(ErrorCode.ERR_BadVarargs, location); // PROTOTYPE(ParamsCollections): Test this code path
diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
}
else if (isVararg && IsAsync)
{
Expand Down
Loading