67 references to ERR_LabelNotFound
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Expressions.cs (1)
2453
Error(diagnostics, ErrorCode.
ERR_LabelNotFound
, node, labelName);
Binder\Binder_Lookup.cs (1)
1585
diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.
ERR_LabelNotFound
, unwrappedSymbol.Name) : null;
Binder\SwitchBinder.cs (1)
535
diagnostics.Add(ErrorCode.
ERR_LabelNotFound
, node.Location, labelName);
Errors\ErrorFacts.cs (1)
745
or ErrorCode.
ERR_LabelNotFound
FlowAnalysis\ControlFlowPass.cs (1)
219
Diagnostics.Add(ErrorCode.
ERR_LabelNotFound
, loc, ((BoundGotoStatement)pending.Branch).Label.Name);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\GotoTest.cs (13)
571
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("x").WithLocation(5, 5));
588
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("x").WithLocation(4, 5),
607
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "x").WithArguments("x").WithLocation(4, 10));
625
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("x").WithLocation(6, 5));
643
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("x").WithLocation(5, 5));
660
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "x").WithArguments("x").WithLocation(5, 10));
952
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L0").WithArguments("L0").WithLocation(1, 6),
955
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L1").WithArguments("L1").WithLocation(3, 14),
1007
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L").WithLocation(1, 6));
1027
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L").WithLocation(3, 17));
1044
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L").WithLocation(6, 6),
1134
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "B").WithArguments("B").WithLocation(2, 9),
1137
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "A").WithArguments("A").WithLocation(3, 9));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
FlowAnalysis\LocalFunctions.cs (1)
401
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label1").WithLocation(14, 13));
Semantics\PatternSwitchTests.cs (2)
1028
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 3;").WithArguments("case 3:").WithLocation(15, 17),
1045
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 3;").WithArguments("case 3:").WithLocation(15, 17)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (25)
IOperation\IOperationTests_IBranchOperation.cs (21)
331
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label1").WithArguments("label1").WithLocation(6, 14)
374
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label1").WithArguments("label1").WithLocation(6, 14),
377
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label1").WithArguments("label1").WithLocation(7, 14)
425
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label2").WithArguments("label2").WithLocation(6, 21)
475
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label2").WithArguments("label2").WithLocation(6, 21),
478
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label2").WithArguments("label2").WithLocation(7, 21)
546
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label1").WithArguments("label1").WithLocation(7, 14)
599
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label1").WithArguments("label1").WithLocation(7, 14),
602
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label1").WithArguments("label1").WithLocation(9, 14)
1095
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "finallyLabel").WithArguments("finallyLabel").WithLocation(6, 14),
1098
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "catchlabel").WithArguments("catchlabel").WithLocation(7, 14),
1101
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "trylabel").WithArguments("trylabel").WithLocation(8, 14),
1104
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "finallyLabel").WithArguments("finallyLabel").WithLocation(13, 18),
1107
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "catchlabel").WithArguments("catchlabel").WithLocation(14, 18),
1110
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "finallyLabel").WithArguments("finallyLabel").WithLocation(20, 18),
1113
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "trylabel").WithArguments("trylabel").WithLocation(21, 18),
1116
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "catchlabel").WithArguments("catchlabel").WithLocation(27, 18),
1119
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "trylabel").WithArguments("trylabel").WithLocation(28, 18),
1410
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label").WithLocation(9, 13),
1477
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label").WithLocation(11, 13),
1543
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label").WithLocation(10, 13),
IOperation\IOperationTests_InvalidStatement.cs (2)
356
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 1;").WithArguments("case 1:").WithLocation(11, 27)
526
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 1;").WithArguments("case 1:").WithLocation(11, 27)
IOperation\IOperationTests_ISwitchOperation.cs (1)
1045
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 3;").WithArguments("case 3:").WithLocation(9, 17),
IOperation\IOperationTests_IUsingStatement.cs (1)
7942
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("x").WithLocation(8, 13)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
Semantics\ForLoopErrorTests.cs (1)
147
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "outerLoop").WithArguments("outerLoop"),
Semantics\LocalFunctionTests.cs (2)
3251
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "A").WithArguments("A").WithLocation(8, 14),
3276
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("A").WithLocation(8, 13)
Semantics\ScriptSemanticsTests.cs (1)
1101
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Object").WithArguments("Object"));
Semantics\SemanticErrorTests.cs (11)
5225
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
ERR_LabelNotFound
, Line = 6, Column = 14 }
5252
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto default;").WithArguments("default:"),
5277
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label").WithArguments("Label"),
5300
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label").WithArguments("Label"),
5327
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label2").WithArguments("Label2"),
5328
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label1").WithArguments("Label1"),
5349
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L"),
5398
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label3").WithArguments("label3"),
5399
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label5").WithArguments("label5"),
5436
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label2"),
5466
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "innerLoop").WithArguments("innerLoop"),
Semantics\SwitchTests.cs (4)
399
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 5;").WithArguments("case 5:").WithLocation(10, 17),
407
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 5;").WithArguments("case 5:").WithLocation(10, 17),
2786
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "System").WithArguments("System").WithLocation(11, 22),
2797
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "System").WithArguments("System").WithLocation(11, 22),
Semantics\TopLevelStatementsTests.cs (2)
2415
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Test").WithArguments("Test").WithLocation(15, 14),
2418
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Test").WithArguments("Test").WithLocation(30, 18)