30 references to ERR_StaticLocalFunctionCannotCaptureVariable
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
1918
or ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
213
? ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\ExtensionTests.cs (2)
31865
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "p").WithArguments("p").WithLocation(9, 39),
31868
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "p").WithArguments("p").WithLocation(15, 35)
Semantics\PrimaryConstructorTests.cs (1)
20361
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)
6164
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(7, 31),
6167
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "y").WithArguments("y").WithLocation(8, 31),
6170
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(11, 28));
6194
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(10, 35),
6197
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "y").WithArguments("y").WithLocation(10, 40));
6219
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "x").WithArguments("x").WithLocation(8, 25));
6952
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "F1()").WithArguments("F1").WithLocation(11, 13));
6975
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>()").WithArguments("Local").WithLocation(9, 13));
7004
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>()").WithArguments("Local").WithLocation(14, 13));
7030
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "F1").WithArguments("F1").WithLocation(11, 24),
7033
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "F1").WithArguments("F1").WithLocation(12, 28));
7059
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>").WithArguments("Local").WithLocation(11, 17),
7062
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<string>").WithArguments("Local").WithLocation(12, 28));
7091
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "Local<int>").WithArguments("Local").WithLocation(15, 20));
7223
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "l").WithArguments("l").WithLocation(15, 31));
7382
Diagnostic(ErrorCode.
ERR_StaticLocalFunctionCannotCaptureVariable
, "_").WithArguments("_").WithLocation(17, 37));
11068
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),