This commit is contained in:
Jonathon Marolf 2022-09-07 05:55:59 -07:00
Родитель 99cf76ccd6
Коммит 9b2d784789
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 2ED921281DF6D32E
3 изменённых файлов: 26 добавлений и 23 удалений

Просмотреть файл

@ -329,11 +329,11 @@ class Program
C.InstanceField
C.InstanceMethod()
C.InstanceProperty
object.Equals(object)
object.Equals(object, object)
object.Equals(object?)
object.Equals(object?, object?)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ReferenceEquals(object?, object?)
object.ToString()", results);
}
@ -1165,15 +1165,14 @@ class Program
public void OverloadBindingDetermination()
{
string source = @"
using System;
class Program
{
private int Identity(int a)
private static int Identity(int a)
{
return a;
}
private char Identity(char a)
private static char Identity(char a)
{
return a;
}
@ -1183,7 +1182,7 @@ class Program
var v1 = Identity(3);
var v2 = Identity('a');
var v3 = Identity(""arg1"")
};
}
}
";
@ -1192,7 +1191,6 @@ class Program
SemanticModel model = compilation.GetSemanticModel(tree);
IEnumerable<InvocationExpressionSyntax> allInvocations = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>();
// Below, we expect to find that the Method taking an int was selected.
// We can confidently index into the invocations because we are following the source line-by-line. This is not always a safe practice.
InvocationExpressionSyntax intInvocation = allInvocations.ElementAt(0);

Просмотреть файл

@ -356,28 +356,35 @@ Next", vbNode);
public void TestAsyncModifier()
{
string csharpCode =
@"async void M()
@"
class C
{
}
async void M()
{
}
async Task N()
{
}
async Task N()
{
}
async Task<int> O()
{
async Task<int> O()
{
}
}";
string vbNode = Converter.Convert(csharpCode);
Assert.Equal(
@"Async Sub M()
End Sub
@"Class C
Async Function N() As Task
End Function
Async Sub M()
End Sub
Async Function O() As Task(Of Integer)
End Function
Async Function N() As Task
End Function
Async Function O() As Task(Of Integer)
End Function
End Class
",
vbNode);
}

Просмотреть файл

@ -257,7 +257,6 @@ End Module
Order By result)
Dim expected As String = <text>C
FxResources
Internal
j As Integer
Microsoft
@ -287,7 +286,6 @@ Program.i As Integer</text>.Value, actual)
Assert.Equal(
<text>C
FxResources
Internal
Microsoft
Program