30 references to ERR_StaticLocalFunctionCannotCaptureVariable
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
1911
or ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
213
? ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\ExtensionTests.cs (2)
27065
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "p").WithArguments("p").WithLocation(9, 39),
27068
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "p").WithArguments("p").WithLocation(15, 35)
Semantics\PrimaryConstructorTests.cs (1)
20221
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "p1").WithArguments("p1").WithLocation(4, 61),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_ILocalFunctionStatement.cs (2)
638
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(14, 20)
2032
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(10, 52)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
Semantics\AnonymousFunctionTests.cs (4)
607
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "i").WithArguments("i").WithLocation(11, 31));
631
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "i").WithArguments("i").WithLocation(11, 31));
713
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "i").WithArguments("i").WithLocation(11, 31));
740
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "i").WithArguments("i").WithLocation(11, 31));
Semantics\LocalFunctionTests.cs (17)
5818
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(7, 31),
5821
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "y").WithArguments("y").WithLocation(8, 31),
5824
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(11, 28));
5848
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(10, 35),
5851
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "y").WithArguments("y").WithLocation(10, 40));
5873
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(8, 25));
6606
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "F1()").WithArguments("F1").WithLocation(11, 13));
6629
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>()").WithArguments("Local").WithLocation(9, 13));
6658
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>()").WithArguments("Local").WithLocation(14, 13));
6684
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "F1").WithArguments("F1").WithLocation(11, 24),
6687
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "F1").WithArguments("F1").WithLocation(12, 28));
6713
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>").WithArguments("Local").WithLocation(11, 17),
6716
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<string>").WithArguments("Local").WithLocation(12, 28));
6745
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>").WithArguments("Local").WithLocation(15, 20));
6877
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "l").WithArguments("l").WithLocation(15, 31));
7036
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "_").WithArguments("_").WithLocation(17, 37));
10711
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "p").WithArguments("p").WithLocation(16, 42)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\LocalFunctionTests.cs (2)
231
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "c").WithArguments("c").WithLocation(9, 14),
234
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "c").WithArguments("c").WithLocation(10, 31),