173 references to ERR_BadOpOnNullOrDefaultOrNew
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Expressions.cs (1)
7689
DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, SyntaxFacts.GetText(operatorToken.Kind()), boundLeft.Display);
Binder\Binder_Operators.cs (5)
1292
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorToken.Text, "default");
1306
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorToken.Text, left.Display);
1309
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorToken.Text, right.Display);
4159
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorText, operand.Display);
5425
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, node.OperatorToken.Text, "default");
Errors\ErrorFacts.cs (1)
1833
or ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Semantics\ExtensionOperatorsTests.cs (9)
2027
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "+null").WithArguments("+", "<null>").WithLocation(19, 13),
13514
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 + new()").WithArguments("+", "new()").WithLocation(28, 13),
13517
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + s1").WithArguments("+", "new()").WithLocation(29, 13),
13520
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + new()").WithArguments("+", "new()").WithLocation(30, 13),
13523
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 + default").WithArguments("+", "default").WithLocation(31, 13),
13526
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + s1").WithArguments("+", "default").WithLocation(32, 13),
13529
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + default").WithArguments("+", "default").WithLocation(33, 13)
24134
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 += new()").WithArguments("+=", "new()").WithLocation(28, 13),
24143
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 += default").WithArguments("+=", "default").WithLocation(31, 13),
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (4)
20332
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 += new()").WithArguments("+=", "new()").WithLocation(17, 9),
20335
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s2 += new()").WithArguments("+=", "new()").WithLocation(20, 9)
20370
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 += default").WithArguments("+=", "default").WithLocation(17, 9),
20373
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s2 += default").WithArguments("+=", "default").WithLocation(20, 9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (153)
Semantics\ImplicitObjectCreationTests.cs (87)
3387
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + new()").WithArguments("+", "new()").WithLocation(6, 17),
3390
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() - new()").WithArguments("-", "new()").WithLocation(7, 17),
3393
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() & new()").WithArguments("&", "new()").WithLocation(8, 17),
3396
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() | new()").WithArguments("|", "new()").WithLocation(9, 17),
3399
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() ^ new()").WithArguments("^", "new()").WithLocation(10, 17),
3402
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() * new()").WithArguments("*", "new()").WithLocation(11, 17),
3405
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() / new()").WithArguments("/", "new()").WithLocation(12, 17),
3408
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() % new()").WithArguments("%", "new()").WithLocation(13, 17),
3411
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >> new()").WithArguments(">>", "new()").WithLocation(14, 17),
3414
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() << new()").WithArguments("<<", "new()").WithLocation(15, 17),
3417
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() > new()").WithArguments(">", "new()").WithLocation(16, 17),
3420
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() < new()").WithArguments("<", "new()").WithLocation(17, 17),
3423
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >= new()").WithArguments(">=", "new()").WithLocation(18, 17),
3426
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() <= new()").WithArguments("<=", "new()").WithLocation(19, 17),
3429
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new()").WithArguments("==", "new()").WithLocation(20, 17),
3432
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new()").WithArguments("!=", "new()").WithLocation(21, 17),
3450
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >>> new()").WithArguments(">>>", "new()").WithLocation(25, 17)
3490
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + 1").WithArguments("+", "new()").WithLocation(6, 13),
3493
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() - 1").WithArguments("-", "new()").WithLocation(7, 13),
3496
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() & 1").WithArguments("&", "new()").WithLocation(8, 13),
3499
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() | 1").WithArguments("|", "new()").WithLocation(9, 13),
3502
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() ^ 1").WithArguments("^", "new()").WithLocation(10, 13),
3505
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() * 1").WithArguments("*", "new()").WithLocation(11, 13),
3508
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() / 1").WithArguments("/", "new()").WithLocation(12, 13),
3511
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() % 1").WithArguments("%", "new()").WithLocation(13, 13),
3514
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >> 1").WithArguments(">>", "new()").WithLocation(14, 13),
3517
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() << 1").WithArguments("<<", "new()").WithLocation(15, 13),
3520
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() > 1").WithArguments(">", "new()").WithLocation(16, 13),
3523
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() < 1").WithArguments("<", "new()").WithLocation(17, 13),
3526
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >= 1").WithArguments(">=", "new()").WithLocation(18, 13),
3529
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() <= 1").WithArguments("<=", "new()").WithLocation(19, 13),
3532
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == 1").WithArguments("==", "new()").WithLocation(20, 13),
3535
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != 1").WithArguments("!=", "new()").WithLocation(21, 13),
3547
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >>> 1").WithArguments(">>>", "new()").WithLocation(25, 13)
3587
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 + new()").WithArguments("+", "new()").WithLocation(6, 13),
3590
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 - new()").WithArguments("-", "new()").WithLocation(7, 13),
3593
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 & new()").WithArguments("&", "new()").WithLocation(8, 13),
3596
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 | new()").WithArguments("|", "new()").WithLocation(9, 13),
3599
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 ^ new()").WithArguments("^", "new()").WithLocation(10, 13),
3602
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 * new()").WithArguments("*", "new()").WithLocation(11, 13),
3605
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 / new()").WithArguments("/", "new()").WithLocation(12, 13),
3608
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 % new()").WithArguments("%", "new()").WithLocation(13, 13),
3611
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >> new()").WithArguments(">>", "new()").WithLocation(14, 13),
3614
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 << new()").WithArguments("<<", "new()").WithLocation(15, 13),
3617
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 > new()").WithArguments(">", "new()").WithLocation(16, 13),
3620
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 < new()").WithArguments("<", "new()").WithLocation(17, 13),
3623
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >= new()").WithArguments(">=", "new()").WithLocation(18, 13),
3626
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 <= new()").WithArguments("<=", "new()").WithLocation(19, 13),
3629
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 == new()").WithArguments("==", "new()").WithLocation(20, 13),
3632
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 != new()").WithArguments("!=", "new()").WithLocation(21, 13),
3644
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >>> new()").WithArguments(">>>", "new()").WithLocation(25, 13)
3789
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == (1, 2L)").WithArguments("==", "new()").WithLocation(7, 23),
3792
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != (1, 2L)").WithArguments("!=", "new()").WithLocation(8, 23),
3795
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) == new()").WithArguments("==", "new()").WithLocation(9, 23),
3798
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) != new()").WithArguments("!=", "new()").WithLocation(10, 23)
3824
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) == (1, 2L)").WithArguments("==", "new()").WithLocation(8, 23),
3827
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) == (1, 2L)").WithArguments("==", "new()").WithLocation(8, 23),
3830
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) != (1, 2L)").WithArguments("!=", "new()").WithLocation(9, 23),
3833
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) != (1, 2L)").WithArguments("!=", "new()").WithLocation(9, 23),
3836
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) == (new(), new())").WithArguments("==", "new()").WithLocation(10, 23),
3839
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) == (new(), new())").WithArguments("==", "new()").WithLocation(10, 23),
3842
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) != (new(), new())").WithArguments("!=", "new()").WithLocation(11, 23),
3845
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) != (new(), new())").WithArguments("!=", "new()").WithLocation(11, 23)
3871
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() == new()").WithArguments("==", "new()").WithLocation(8, 23),
3874
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() != new()").WithArguments("!=", "new()").WithLocation(9, 23),
3877
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new C()").WithArguments("==", "new()").WithLocation(10, 23),
3880
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new C()").WithArguments("!=", "new()").WithLocation(11, 23)
3916
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() == new()").WithArguments("==", "new()").WithLocation(18, 27),
3919
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new C()").WithArguments("==", "new()").WithLocation(19, 27),
3922
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() != new()").WithArguments("!=", "new()").WithLocation(20, 27),
3925
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new C()").WithArguments("!=", "new()").WithLocation(21, 27)
3956
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S() == new()").WithArguments("==", "new()").WithLocation(8, 27),
3959
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new S()").WithArguments("==", "new()").WithLocation(9, 27),
3962
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S() != new()").WithArguments("!=", "new()").WithLocation(10, 27),
3965
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new S()").WithArguments("!=", "new()").WithLocation(11, 27),
3968
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?() == new()").WithArguments("==", "new()").WithLocation(13, 27),
3971
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new S?()").WithArguments("==", "new()").WithLocation(14, 27),
3974
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?() != new()").WithArguments("!=", "new()").WithLocation(15, 27),
3977
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new S?()").WithArguments("!=", "new()").WithLocation(16, 27)
4016
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S(42) == new(42)").WithArguments("==", "new(int)").WithLocation(16, 27),
4019
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) == new S(42)").WithArguments("==", "new(int)").WithLocation(17, 27),
4022
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S(42) != new(42)").WithArguments("!=", "new(int)").WithLocation(18, 27),
4025
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) != new S(42)").WithArguments("!=", "new(int)").WithLocation(19, 27),
4028
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?(new(42)) == new(42)").WithArguments("==", "new(int)").WithLocation(21, 27),
4031
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) == new S?(new(42))").WithArguments("==", "new(int)").WithLocation(22, 27),
4034
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?(new(42)) != new(42)").WithArguments("!=", "new(int)").WithLocation(23, 27),
4037
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) != new S?(new(42))").WithArguments("!=", "new(int)").WithLocation(24, 27)
Semantics\NullableReferenceTypesTests.cs (3)
3844
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "!null").WithArguments("!", "<null>").WithLocation(18, 13),
3847
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "!(null!)").WithArguments("!", "<null>").WithLocation(19, 13),
3896
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 + default!").WithArguments("+", "default").WithLocation(8, 13),
Semantics\SemanticErrorTests.cs (8)
1078
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "-null").WithArguments("-", "<null>").WithLocation(12, 26),
1081
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "!null").WithArguments("!", "<null>").WithLocation(13, 19),
1084
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "~null").WithArguments("~", "<null>").WithLocation(14, 19),
1093
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "+null").WithArguments("+", "<null>").WithLocation(18, 20)
1121
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "!null").WithArguments("!", "<null>").WithLocation(6, 19),
1124
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "~null").WithArguments("~", "<null>").WithLocation(7, 18),
1127
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "+null").WithArguments("+", "<null>").WithLocation(8, 20),
1130
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "-null").WithArguments("-", "<null>").WithLocation(9, 19)
Semantics\TargetTypedDefaultTests.cs (55)
1250
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + 4").WithArguments("+", "default").WithLocation(6, 25)
1296
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + default").WithArguments("+", "default").WithLocation(6, 17),
1299
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default - default").WithArguments("-", "default").WithLocation(7, 17),
1302
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default & default").WithArguments("&", "default").WithLocation(8, 17),
1305
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default | default").WithArguments("|", "default").WithLocation(9, 17),
1308
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default ^ default").WithArguments("^", "default").WithLocation(10, 17),
1311
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default * default").WithArguments("*", "default").WithLocation(11, 17),
1314
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default / default").WithArguments("/", "default").WithLocation(12, 17),
1317
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default % default").WithArguments("%", "default").WithLocation(13, 17),
1320
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default >> default").WithArguments(">>", "default").WithLocation(14, 17),
1323
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default << default").WithArguments("<<", "default").WithLocation(15, 17),
1326
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default > default").WithArguments(">", "default").WithLocation(16, 17),
1329
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default < default").WithArguments("<", "default").WithLocation(17, 17),
1332
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default >= default").WithArguments(">=", "default").WithLocation(18, 17),
1335
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default <= default").WithArguments("<=", "default").WithLocation(19, 17),
1359
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default >>> default").WithArguments(">>>", "default").WithLocation(25, 17)
1405
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + 1").WithArguments("+", "default").WithLocation(6, 17),
1408
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default - 1").WithArguments("-", "default").WithLocation(7, 17),
1411
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default & 1").WithArguments("&", "default").WithLocation(8, 17),
1414
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default | 1").WithArguments("|", "default").WithLocation(9, 17),
1417
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default ^ 1").WithArguments("^", "default").WithLocation(10, 17),
1420
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default * 1").WithArguments("*", "default").WithLocation(11, 17),
1423
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default / 1").WithArguments("/", "default").WithLocation(12, 17),
1426
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default % 1").WithArguments("%", "default").WithLocation(13, 17),
1429
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default >> 1").WithArguments(">>", "default").WithLocation(14, 17),
1432
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default << 1").WithArguments("<<", "default").WithLocation(15, 17),
1435
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default > 1").WithArguments(">", "default").WithLocation(16, 17),
1438
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default < 1").WithArguments("<", "default").WithLocation(17, 17),
1441
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default >= 1").WithArguments(">=", "default").WithLocation(18, 17),
1444
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default <= 1").WithArguments("<=", "default").WithLocation(19, 17),
1465
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default >>> 1").WithArguments(">>>", "default").WithLocation(26, 17)
1511
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 + default").WithArguments("+", "default").WithLocation(6, 17),
1514
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 - default").WithArguments("-", "default").WithLocation(7, 17),
1517
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 & default").WithArguments("&", "default").WithLocation(8, 17),
1520
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 | default").WithArguments("|", "default").WithLocation(9, 17),
1523
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 ^ default").WithArguments("^", "default").WithLocation(10, 17),
1526
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 * default").WithArguments("*", "default").WithLocation(11, 17),
1529
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 / default").WithArguments("/", "default").WithLocation(12, 17),
1532
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 % default").WithArguments("%", "default").WithLocation(13, 17),
1535
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >> default").WithArguments(">>", "default").WithLocation(14, 17),
1538
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 << default").WithArguments("<<", "default").WithLocation(15, 17),
1541
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 > default").WithArguments(">", "default").WithLocation(16, 17),
1544
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 < default").WithArguments("<", "default").WithLocation(17, 17),
1547
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >= default").WithArguments(">=", "default").WithLocation(18, 17),
1550
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 <= default").WithArguments("<=", "default").WithLocation(19, 17),
1568
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >>> default").WithArguments(">>>", "default").WithLocation(26, 17)
1618
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s += default").WithArguments("+=", "default").WithLocation(8, 9)
1972
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "i += default").WithArguments("+=", "default").WithLocation(9, 13),
1975
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "b &= default").WithArguments("&=", "default").WithLocation(11, 13),
1978
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "true | default").WithArguments("|", "default").WithLocation(12, 37),
2115
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "!null").WithArguments("!", "<null>").WithLocation(6, 22)
2528
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + 1").WithArguments("+", "default").WithLocation(5, 16)
2553
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + 1").WithArguments("+", "default").WithLocation(5, 16)
3797
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "d += new(M)").WithArguments("+=", "new(method group)").WithLocation(11, 1),
3800
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "d += default").WithArguments("+=", "default").WithLocation(14, 1)