26 references to ERR_RefReturningCallAndAwait
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
617
or ErrorCode.
ERR_RefReturningCallAndAwait
Lowering\StateMachineRewriter\RefInitializationHoister.cs (1)
243
_factory.Diagnostics.Add(ErrorCode.
ERR_RefReturningCallAndAwait
, _factory.Syntax.Location, call.Method);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenAsyncSpillTests.cs (1)
10324
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "P").WithArguments("C.P.get").WithLocation(18, 28);
CodeGen\CodeGenAsyncTests.cs (2)
7535
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "ReadMemory()").WithArguments("IntCode.ReadMemory()").WithLocation(8, 9),
7538
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "ReadMemory()").WithArguments("IntCode.ReadMemory()").WithLocation(9, 9)
CodeGen\CodeGenInParametersTests.cs (1)
1575
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "RefReturning(ref local)").WithArguments("Program.RefReturning(ref int)").WithLocation(14, 19)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (10)
Semantics\InlineArrayTests.cs (9)
4957
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "GetItem(MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As<Buffer10<Buffer10<int>>, Buffer10<int>>(ref Unsafe.AsRef(in GetC(x).F)),10), Get01())").WithArguments("Program.GetItem(System.ReadOnlySpan<Buffer10<int>>, int)").WithLocation(20, 12)
20516
DiagnosticDescription expected = Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
,
20983
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
,
21267
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, @"foreach (ref int y in GetBuffer())
21425
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, @"foreach (ref readonly int y in GetBuffer())
21939
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
,
22261
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
,
22528
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, @"foreach (ref int y in GetBuffer())
22692
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, @"foreach (ref readonly int y in GetBuffer())
Semantics\PatternSwitchTests.cs (1)
3525
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "GetRef()").WithArguments("Program.<<Main>$>g__GetRef|0_0()").WithLocation(2, 1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Semantics\AwaitExpressionTests.cs (3)
155
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "res.Get()").WithArguments("RefHolder<T>.Get()").WithLocation(17, 13)
193
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "res.Get()").WithArguments("RefHolder<T>.Get()").WithLocation(19, 17)
236
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "res[0]").WithArguments("ValuesHolder<TResult>.this[int].get").WithLocation(23, 4)
Semantics\RefLocalsAndReturnsTests.cs (6)
3534
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "Save(await Task.FromResult(0))").WithArguments("TestClass.Save(int)").WithLocation(26, 19)
3838
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "GiveMeRef()").WithArguments("Program.GiveMeRef()").WithLocation(9, 16));
4446
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "S.Instance").WithArguments("S.Instance.get").WithLocation(32, 17),
4449
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "Assign(ref temp, 0)").WithArguments("C.Assign(ref int, int)").WithLocation(33, 28)
4497
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "Save(1)").WithArguments("TestClass.Save(int)").WithLocation(28, 9),
4500
Diagnostic(ErrorCode.
ERR_RefReturningCallAndAwait
, "inst[1, 2]").WithArguments("TestClass.this[int, int].get").WithLocation(36, 9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
2972
case ErrorCode.
ERR_RefReturningCallAndAwait
: