173 references to ERR_BadOpOnNullOrDefaultOrNew
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Expressions.cs (1)
7727
DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, SyntaxFacts.GetText(operatorToken.Kind()), boundLeft.Display);
Binder\Binder_Operators.cs (5)
1299
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorToken.Text, "default");
1313
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorToken.Text, left.Display);
1316
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorToken.Text, right.Display);
4191
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, operatorText, operand.Display);
5457
Error(diagnostics, ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, node, node.OperatorToken.Text, "default");
Errors\ErrorFacts.cs (1)
1832
or ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Semantics\ExtensionOperatorsTests.cs (9)
2028
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "+null").WithArguments("+", "<null>").WithLocation(19, 13),
13599
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 + new()").WithArguments("+", "new()").WithLocation(28, 13),
13602
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + s1").WithArguments("+", "new()").WithLocation(29, 13),
13605
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + new()").WithArguments("+", "new()").WithLocation(30, 13),
13608
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 + default").WithArguments("+", "default").WithLocation(31, 13),
13611
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + s1").WithArguments("+", "default").WithLocation(32, 13),
13614
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "default + default").WithArguments("+", "default").WithLocation(33, 13)
24261
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "s1 += new()").WithArguments("+=", "new()").WithLocation(28, 13),
24270
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)
3383
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + new()").WithArguments("+", "new()").WithLocation(6, 17),
3386
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() - new()").WithArguments("-", "new()").WithLocation(7, 17),
3389
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() & new()").WithArguments("&", "new()").WithLocation(8, 17),
3392
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() | new()").WithArguments("|", "new()").WithLocation(9, 17),
3395
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() ^ new()").WithArguments("^", "new()").WithLocation(10, 17),
3398
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() * new()").WithArguments("*", "new()").WithLocation(11, 17),
3401
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() / new()").WithArguments("/", "new()").WithLocation(12, 17),
3404
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() % new()").WithArguments("%", "new()").WithLocation(13, 17),
3407
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >> new()").WithArguments(">>", "new()").WithLocation(14, 17),
3410
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() << new()").WithArguments("<<", "new()").WithLocation(15, 17),
3413
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() > new()").WithArguments(">", "new()").WithLocation(16, 17),
3416
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() < new()").WithArguments("<", "new()").WithLocation(17, 17),
3419
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >= new()").WithArguments(">=", "new()").WithLocation(18, 17),
3422
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() <= new()").WithArguments("<=", "new()").WithLocation(19, 17),
3425
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new()").WithArguments("==", "new()").WithLocation(20, 17),
3428
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new()").WithArguments("!=", "new()").WithLocation(21, 17),
3446
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >>> new()").WithArguments(">>>", "new()").WithLocation(25, 17)
3486
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() + 1").WithArguments("+", "new()").WithLocation(6, 13),
3489
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() - 1").WithArguments("-", "new()").WithLocation(7, 13),
3492
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() & 1").WithArguments("&", "new()").WithLocation(8, 13),
3495
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() | 1").WithArguments("|", "new()").WithLocation(9, 13),
3498
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() ^ 1").WithArguments("^", "new()").WithLocation(10, 13),
3501
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() * 1").WithArguments("*", "new()").WithLocation(11, 13),
3504
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() / 1").WithArguments("/", "new()").WithLocation(12, 13),
3507
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() % 1").WithArguments("%", "new()").WithLocation(13, 13),
3510
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >> 1").WithArguments(">>", "new()").WithLocation(14, 13),
3513
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() << 1").WithArguments("<<", "new()").WithLocation(15, 13),
3516
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() > 1").WithArguments(">", "new()").WithLocation(16, 13),
3519
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() < 1").WithArguments("<", "new()").WithLocation(17, 13),
3522
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >= 1").WithArguments(">=", "new()").WithLocation(18, 13),
3525
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() <= 1").WithArguments("<=", "new()").WithLocation(19, 13),
3528
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == 1").WithArguments("==", "new()").WithLocation(20, 13),
3531
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != 1").WithArguments("!=", "new()").WithLocation(21, 13),
3543
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() >>> 1").WithArguments(">>>", "new()").WithLocation(25, 13)
3583
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 + new()").WithArguments("+", "new()").WithLocation(6, 13),
3586
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 - new()").WithArguments("-", "new()").WithLocation(7, 13),
3589
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 & new()").WithArguments("&", "new()").WithLocation(8, 13),
3592
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 | new()").WithArguments("|", "new()").WithLocation(9, 13),
3595
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 ^ new()").WithArguments("^", "new()").WithLocation(10, 13),
3598
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 * new()").WithArguments("*", "new()").WithLocation(11, 13),
3601
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 / new()").WithArguments("/", "new()").WithLocation(12, 13),
3604
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 % new()").WithArguments("%", "new()").WithLocation(13, 13),
3607
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >> new()").WithArguments(">>", "new()").WithLocation(14, 13),
3610
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 << new()").WithArguments("<<", "new()").WithLocation(15, 13),
3613
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 > new()").WithArguments(">", "new()").WithLocation(16, 13),
3616
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 < new()").WithArguments("<", "new()").WithLocation(17, 13),
3619
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >= new()").WithArguments(">=", "new()").WithLocation(18, 13),
3622
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 <= new()").WithArguments("<=", "new()").WithLocation(19, 13),
3625
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 == new()").WithArguments("==", "new()").WithLocation(20, 13),
3628
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 != new()").WithArguments("!=", "new()").WithLocation(21, 13),
3640
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "1 >>> new()").WithArguments(">>>", "new()").WithLocation(25, 13)
3785
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == (1, 2L)").WithArguments("==", "new()").WithLocation(7, 23),
3788
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != (1, 2L)").WithArguments("!=", "new()").WithLocation(8, 23),
3791
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) == new()").WithArguments("==", "new()").WithLocation(9, 23),
3794
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) != new()").WithArguments("!=", "new()").WithLocation(10, 23)
3820
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) == (1, 2L)").WithArguments("==", "new()").WithLocation(8, 23),
3823
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) == (1, 2L)").WithArguments("==", "new()").WithLocation(8, 23),
3826
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) != (1, 2L)").WithArguments("!=", "new()").WithLocation(9, 23),
3829
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(new(), new()) != (1, 2L)").WithArguments("!=", "new()").WithLocation(9, 23),
3832
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) == (new(), new())").WithArguments("==", "new()").WithLocation(10, 23),
3835
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) == (new(), new())").WithArguments("==", "new()").WithLocation(10, 23),
3838
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) != (new(), new())").WithArguments("!=", "new()").WithLocation(11, 23),
3841
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "(1, 2L) != (new(), new())").WithArguments("!=", "new()").WithLocation(11, 23)
3867
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() == new()").WithArguments("==", "new()").WithLocation(8, 23),
3870
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() != new()").WithArguments("!=", "new()").WithLocation(9, 23),
3873
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new C()").WithArguments("==", "new()").WithLocation(10, 23),
3876
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new C()").WithArguments("!=", "new()").WithLocation(11, 23)
3912
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() == new()").WithArguments("==", "new()").WithLocation(18, 27),
3915
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new C()").WithArguments("==", "new()").WithLocation(19, 27),
3918
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new C() != new()").WithArguments("!=", "new()").WithLocation(20, 27),
3921
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new C()").WithArguments("!=", "new()").WithLocation(21, 27)
3952
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S() == new()").WithArguments("==", "new()").WithLocation(8, 27),
3955
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new S()").WithArguments("==", "new()").WithLocation(9, 27),
3958
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S() != new()").WithArguments("!=", "new()").WithLocation(10, 27),
3961
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new S()").WithArguments("!=", "new()").WithLocation(11, 27),
3964
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?() == new()").WithArguments("==", "new()").WithLocation(13, 27),
3967
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() == new S?()").WithArguments("==", "new()").WithLocation(14, 27),
3970
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?() != new()").WithArguments("!=", "new()").WithLocation(15, 27),
3973
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new() != new S?()").WithArguments("!=", "new()").WithLocation(16, 27)
4012
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S(42) == new(42)").WithArguments("==", "new(int)").WithLocation(16, 27),
4015
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) == new S(42)").WithArguments("==", "new(int)").WithLocation(17, 27),
4018
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S(42) != new(42)").WithArguments("!=", "new(int)").WithLocation(18, 27),
4021
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) != new S(42)").WithArguments("!=", "new(int)").WithLocation(19, 27),
4024
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?(new(42)) == new(42)").WithArguments("==", "new(int)").WithLocation(21, 27),
4027
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new(42) == new S?(new(42))").WithArguments("==", "new(int)").WithLocation(22, 27),
4030
Diagnostic(ErrorCode.
ERR_BadOpOnNullOrDefaultOrNew
, "new S?(new(42)) != new(42)").WithArguments("!=", "new(int)").WithLocation(23, 27),
4033
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)