23 references to ERR_NoConvToIAsyncDisp
Microsoft.CodeAnalysis.CSharp (2)
Binder\UsingStatementBinder.cs (1)
261
: (hasAwait ? ErrorCode.
ERR_NoConvToIAsyncDisp
: ErrorCode.ERR_NoConvToIDisp);
Errors\ErrorFacts.cs (1)
1903
or ErrorCode.
ERR_NoConvToIAsyncDisp
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
CodeGen\CodeGenAwaitUsingTests.cs (11)
931
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22),
934
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(9, 22)
964
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22),
970
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(9, 22),
2268
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "Main").WithArguments("method group").WithLocation(6, 22)
3656
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22)
3766
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22)
4272
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22));
4802
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new object();").WithArguments("object").WithLocation(6, 9),
4811
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var y = new object()").WithArguments("object").WithLocation(7, 22)
5548
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new Class1();").WithArguments("Class1").WithLocation(5, 1));
CodeGen\CodeGenUsingDeclarationTests.cs (1)
1507
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using const var obj = new object();").WithArguments("object").WithLocation(1, 1),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
RefStructInterfacesTests.cs (1)
13605
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new T()").WithArguments("T").WithLocation(32, 22)
Semantics\ExtensionTests.cs (6)
25903
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x1 = new C1();").WithArguments("C1").WithLocation(4, 1),
25906
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x2 = new C2();").WithArguments("C2").WithLocation(7, 1)
25960
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22)
25981
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(3, 1)
26007
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(3, 1)
26041
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(4, 1)];
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IUsingStatement.cs (2)
4395
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "s").WithArguments("S?").WithLocation(9, 22)
4748
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "this").WithArguments("C").WithLocation(8, 21),