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)
1902
or ErrorCode.
ERR_NoConvToIAsyncDisp
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
CodeGen\CodeGenAwaitUsingTests.cs (11)
606
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22),
609
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(9, 22)
639
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22),
645
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(9, 22),
1661
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "Main").WithArguments("method group").WithLocation(6, 22)
2373
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22)
2432
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "new C()").WithArguments("C").WithLocation(6, 22)
2670
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22));
2987
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new object();").WithArguments("object").WithLocation(6, 9),
2996
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var y = new object()").WithArguments("object").WithLocation(7, 22)
3594
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)
21843
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x1 = new C1();").WithArguments("C1").WithLocation(4, 1),
21846
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x2 = new C2();").WithArguments("C2").WithLocation(7, 1)
21900
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "var x = new C()").WithArguments("C").WithLocation(6, 22)
21921
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(3, 1)
21947
Diagnostic(ErrorCode.
ERR_NoConvToIAsyncDisp
, "await using var x = new C();").WithArguments("C").WithLocation(3, 1)
21982
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),