提交 ae94e427 编写于 作者: G Gen Lu

Address review comments

上级 bc6524f9
......@@ -2245,7 +2245,7 @@ static void M2(int x)
var invocation = (IInvocationExpression)operation;
var argument = invocation.ArgumentsInEvaluationOrder[0];
// We are calling VB extension methods on IArgument in C# code, therefore exception is expteced here.
// We are calling VB extension methods on IArgument in C# code, therefore exception is expected here.
Assert.Throws<ArgumentException>(() => argument.GetInConversion());
Assert.Throws<ArgumentException>(() => argument.GetOutConversion());
}
......
......@@ -106,7 +106,6 @@ Namespace Microsoft.CodeAnalysis.Semantics
Case Else
Dim lastParameterIndex = parameters.Length - 1
Dim kind As ArgumentKind
Dim parameter As ParameterSymbol
If index = lastParameterIndex AndAlso ParameterIsParamArray(parameters(lastParameterIndex)) Then
' TODO: figure out if this is true:
......@@ -114,21 +113,19 @@ Namespace Microsoft.CodeAnalysis.Semantics
' a list of arguments (including 0 argument) is provided for ParamArray parameter in source
' https://github.com/dotnet/roslyn/issues/18550
kind = If(argument.WasCompilerGenerated AndAlso argument.Kind = BoundKind.ArrayCreation, ArgumentKind.ParamArray, ArgumentKind.Explicit)
parameter = parameters(lastParameterIndex)
Else
' TODO: figure our if this is true:
' a compiler generated argument for an Optional parameter is created iff
' the argument is omitted from the source
' https://github.com/dotnet/roslyn/issues/18550
kind = If(argument.WasCompilerGenerated, ArgumentKind.DefaultValue, ArgumentKind.Explicit)
parameter = parameters(index)
End If
Dim value = Create(argument)
Return New VisualBasicArgument(
kind,
parameter,
Create(argument),
parameters(index),
value,
inConversion:=New Conversion(Conversions.Identity),
outConversion:=New Conversion(Conversions.Identity),
semanticModel:=_semanticModel,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册