60 references to ERR_LabelNotFound
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Expressions.cs (1)
2208
Error(diagnostics, ErrorCode.
ERR_LabelNotFound
, node, labelName);
Binder\Binder_Lookup.cs (1)
1493
diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.
ERR_LabelNotFound
, unwrappedSymbol.Name) : null;
Binder\SwitchBinder.cs (1)
531
diagnostics.Add(ErrorCode.
ERR_LabelNotFound
, node.Location, labelName);
Errors\ErrorFacts.cs (1)
684
case ErrorCode.
ERR_LabelNotFound
:
FlowAnalysis\ControlFlowPass.cs (1)
220
Diagnostics.Add(ErrorCode.
ERR_LabelNotFound
, loc, ((BoundGotoStatement)pending.Branch).Label.Name);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\GotoTest.cs (7)
842
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L0").WithArguments("L0").WithLocation(1, 6),
845
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L1").WithArguments("L1").WithLocation(3, 14),
897
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L").WithLocation(1, 6));
917
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L").WithLocation(3, 17));
934
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L").WithLocation(6, 6),
1024
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "B").WithArguments("B").WithLocation(2, 9),
1027
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "A").WithArguments("A").WithLocation(3, 9));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
FlowAnalysis\LocalFunctions.cs (1)
401
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label1").WithLocation(14, 13));
Semantics\PatternSwitchTests.cs (2)
1027
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 3;").WithArguments("case 3:").WithLocation(15, 17),
1044
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto case 3;").WithArguments("case 3:").WithLocation(15, 17)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (24)
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),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
Semantics\ForLoopErrorTests.cs (1)
145
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "outerLoop").WithArguments("outerLoop"),
Semantics\LocalFunctionTests.cs (2)
3167
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "A").WithArguments("A").WithLocation(8, 14),
3192
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)
5227
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
ERR_LabelNotFound
, Line = 6, Column = 14 }
5254
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto default;").WithArguments("default:"),
5279
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label").WithArguments("Label"),
5302
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label").WithArguments("Label"),
5329
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label2").WithArguments("Label2"),
5330
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Label1").WithArguments("Label1"),
5351
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "L").WithArguments("L"),
5400
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label3").WithArguments("label3"),
5401
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "label5").WithArguments("label5"),
5438
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "goto").WithArguments("label2"),
5468
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)
2402
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Test").WithArguments("Test").WithLocation(15, 14),
2405
Diagnostic(ErrorCode.
ERR_LabelNotFound
, "Test").WithArguments("Test").WithLocation(30, 18)