diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/BindingAsyncTasklikeMoreTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/BindingAsyncTasklikeMoreTests.cs index 8197779582e60..28ab05cc7959a 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/BindingAsyncTasklikeMoreTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/BindingAsyncTasklikeMoreTests.cs @@ -647,9 +647,23 @@ public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter namespace System.Runtime.CompilerServices { class AsyncMethodBuilderAttribute : System.Attribute { public AsyncMethodBuilderAttribute(System.Type t) { } } } "; var compilation = CreateCompilationWithMscorlib461(source, references: new MetadataReference[] { CSharpRef, SystemCoreRef }); - var verifier = CompileAndVerify( - compilation, - expectedSignatures: new[] + var expectedSignatures = ExecutionConditionUtil.IsMonoCore + ? new[] + { + Signature( + "C+<>c__DisplayClass2_0", + "b__0", + ".method [System.Runtime.CompilerServices.AsyncStateMachineAttribute(C+<>c__DisplayClass2_0+<b__0>d)] assembly hidebysig instance [System.Runtime.CompilerServices.DynamicAttribute(System.Boolean[])] MyTask`1[System.Object] b__0() cil managed"), + Signature( + "C+<>c__DisplayClass2_0", + "b__1", + ".method [System.Runtime.CompilerServices.AsyncStateMachineAttribute(C+<>c__DisplayClass2_0+<b__1>d)] assembly hidebysig instance [System.Runtime.CompilerServices.DynamicAttribute(System.Boolean[])] MyTask`1[System.Object[]] b__1() cil managed"), + Signature( + "C+<>c__DisplayClass2_0", + "b__2", + ".method [System.Runtime.CompilerServices.AsyncStateMachineAttribute(C+<>c__DisplayClass2_0+<b__2>d)] assembly hidebysig instance [System.Runtime.CompilerServices.DynamicAttribute(System.Boolean[])] MyTask`1[System.Object] b__2() cil managed"), + } + : new[] { Signature( "C+<>c__DisplayClass2_0", @@ -663,7 +677,12 @@ namespace System.Runtime.CompilerServices { class AsyncMethodBuilderAttribute : "C+<>c__DisplayClass2_0", "b__2", ".method [System.Runtime.CompilerServices.AsyncStateMachineAttribute(C+<>c__DisplayClass2_0+<b__2>d)] assembly hidebysig instance [System.Runtime.CompilerServices.DynamicAttribute(System.Collections.ObjectModel.ReadOnlyCollection`1[System.Reflection.CustomAttributeTypedArgument])] MyTask`1[System.Object] b__2() cil managed"), - }); + }; + + var verifier = CompileAndVerify( + compilation, + expectedSignatures: expectedSignatures); + verifier.VerifyDiagnostics(); }