23 references to ERR_NoConvToIAsyncDisp
Microsoft.CodeAnalysis.CSharp (2)
Binder\UsingStatementBinder.cs (1)
265
: (hasAwait ? ErrorCode.
ERR_NoConvToIAsyncDisp
: ErrorCode.ERR_NoConvToIDisp);
Errors\ErrorFacts.cs (1)
1901
or ErrorCode.
ERR_NoConvToIAsyncDisp
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
CodeGen\CodeGenAwaitUsingTests.cs (11)
917
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22),
920
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(9, 22)
950
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22),
956
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(9, 22),
2254
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "Main").WithArguments("method group").WithLocation(6, 22)
3642
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22)
3752
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22)
4258
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22));
4788
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new object();").WithArguments("object").WithLocation(6, 9),
4797
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var y = new object()").WithArguments("object").WithLocation(7, 22)
5534
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)
14003
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new T()").WithArguments("T").WithLocation(32, 22)
Semantics\ExtensionTests.cs (6)
26048
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x1 = new C1();").WithArguments("C1").WithLocation(4, 1),
26051
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x2 = new C2();").WithArguments("C2").WithLocation(7, 1)
26105
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22)
26126
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(3, 1)
26152
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(3, 1)
26186
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),