83 references to ERR_BadEmbeddedStmt
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Statements.cs (2)
324
diagnostics.Add(ErrorCode.
ERR_BadEmbeddedStmt
, node.GetLocation());
342
diagnostics.Add(ErrorCode.
ERR_BadEmbeddedStmt
, node.GetLocation());
Errors\ErrorFacts.cs (1)
1096
case ErrorCode.
ERR_BadEmbeddedStmt
:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (31)
Semantics\PatternMatchingTests.cs (1)
4874
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "int _ ").WithLocation(6, 37),
Semantics\PatternMatchingTests_Global.cs (6)
6910
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(74, 5),
7008
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(74, 5),
7227
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
7331
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
8452
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
8569
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
Semantics\PatternMatchingTests_Scope.cs (24)
1122
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(110, 13),
5469
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
5676
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
5883
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
6511
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var d = true is var x1;").WithLocation(11, 13),
7054
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
7352
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(97, 13),
7688
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
7920
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
8149
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
8407
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
8639
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
9270
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
9482
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
9768
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
10565
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: Dummy(true is var x9, x9);").WithLocation(65, 1),
10571
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: Dummy(true is var x10, x10);").WithLocation(73, 1),
10673
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: Dummy(true is var x1);").WithLocation(13, 1),
12192
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var d,e(string.Empty is var x1 && x1 != null);").WithLocation(11, 13),
12407
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
12753
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
13148
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
13929
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "int[true is var x7, x7] _11;").WithLocation(49, 13),
13935
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "int[true is var x8, x8] _12;").WithLocation(57, 25),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
IOperation\IOperationTests_IIsPatternExpression.cs (1)
500
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "const int y").WithLocation(8, 39),
IOperation\IOperationTests_IUsingStatement.cs (5)
6542
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, @"label1:
6546
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, @"label2:
8625
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "using C1 o1 = new C1();").WithLocation(12, 13)
8722
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "using C1 o1 = new C1();").WithLocation(13, 13)
8818
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "using C1 o1 = new C1();").WithLocation(13, 13)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (40)
Semantics\BindingTests.cs (2)
2008
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "object o = null;").WithLocation(7, 32),
2035
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "label: c = false;").WithLocation(9, 13),
Semantics\ConstantTests.cs (2)
3289
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "const int i = 0;").WithLocation(6, 26),
3352
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "const int i = 0;").WithLocation(2, 18),
Semantics\LocalFunctionTests.cs (2)
3956
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "int Add(int x, int y) => x + y;").WithLocation(7, 9),
3982
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: int Add(int x, int y) => x + y;").WithLocation(7, 1),
Semantics\LockTests.cs (2)
455
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "object"),
735
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "object o = new object();"));
Semantics\OutVarTests.cs (28)
3810
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(97, 13),
5879
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
6294
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
6532
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
6767
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
7031
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
7269
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
8354
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
8626
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(101, 13),
9687
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var d =TakeOutParam(true, out var x1) && x1 != null;").WithLocation(11, 13),
10690
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
15500
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
15713
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
15926
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
16369
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
17365
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: Dummy(TakeOutParam(true, out var x9), x9);").WithLocation(65, 1),
17371
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: Dummy(TakeOutParam(true, out var x10), x10);").WithLocation(73, 1),
17479
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "a: Dummy(TakeOutParam(true, out var x1));").WithLocation(13, 1),
21337
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var d,e(TakeOutParam(true, out var x1) && x1 != null);").WithLocation(11, 13),
21564
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(109, 13),
21922
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
22335
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(87, 13),
23580
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(74, 5),
23678
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(74, 5),
23918
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
24022
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
25203
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
25320
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "var y12 = 12;").WithLocation(52, 5),
Semantics\RefLocalsAndReturnsTests.cs (2)
1342
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "ref int x = ref (new int[1])[0];").WithLocation(8, 13),
1366
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "ref int x = ref (new int[1])[0];").WithLocation(8, 13),
Semantics\SemanticErrorTests.cs (1)
24490
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "value: new Program();").WithLocation(6, 41),
Semantics\UsingStatementTests.cs (1)
1719
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "object o = new object();"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Parsing\ParserErrorMessageTests.cs (3)
2459
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "MyLabel: {}").WithLocation(6, 35),
2481
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "int j;").WithLocation(6, 35),
2503
Diagnostic(ErrorCode.
ERR_BadEmbeddedStmt
, "void j() { }").WithLocation(6, 35),