35 references to WRN_ParameterConditionallyDisallowsNull
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
50
nullableWarnings.Add(GetId(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
));
464
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
:
1978
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
:
FlowAnalysis\NullableWalker.cs (1)
1201
Diagnostics.Add(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, syntax.Location, parameter.Name, sense ? "true" : "false");
Generated\ErrorFacts.Generated.cs (1)
232
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\LambdaTests.cs (1)
4980
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("obj", "true").WithLocation(13, 17)
Semantics\NullableReferenceTypesTests.cs (28)
27301
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(11, 13)
27370
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 17)
27402
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 15)
27466
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(13, 17)
27648
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 13)
27690
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s", "true").WithLocation(22, 9)
40286
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(18, 9),
40289
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(24, 9)
40343
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(24, 9),
40346
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 9)
40416
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !TryGetValueCore(out y);").WithArguments("y", "false").WithLocation(15, 9)
40513
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(15, 13),
40516
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(29, 9),
40519
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(41, 9),
40528
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(51, 9)
40602
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(16, 21),
40611
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 17),
40620
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(42, 17),
40635
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(52, 17)
40778
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue3(out y);").WithArguments("y", "true").WithLocation(17, 9),
40781
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue2(out y);").WithArguments("y", "false").WithLocation(27, 9)
127302
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 9),
127308
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(25, 9)
152476
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
152479
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s1", "true").WithLocation(18, 9)
152518
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
152521
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b && true;").WithArguments("s1", "true").WithLocation(19, 9)
152554
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !M1(out s1);").WithArguments("s1", "true").WithLocation(15, 9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
362
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
: