37 references to WRN_ParameterConditionallyDisallowsNull
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
50
nullableWarnings.Add(GetId(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
));
476
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
:
2035
or ErrorCode.
WRN_ParameterConditionallyDisallowsNull
FlowAnalysis\NullableWalker.cs (1)
1359
Diagnostics.Add(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, syntax.Location, parameter.Name, sense ? "true" : "false");
Generated\ErrorFacts.Generated.cs (1)
231
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
:
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\ExtensionTests.cs (2)
47729
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("o", "true").WithLocation(23, 17),
47732
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("o", "true").WithLocation(37, 13));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\LambdaTests.cs (1)
5017
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("obj", "true").WithLocation(13, 17)
Semantics\NullableReferenceTypesTests.cs (28)
29268
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(11, 13)
29337
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 17)
29369
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 15)
29433
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(13, 17)
29615
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 13)
29657
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s", "true").WithLocation(22, 9)
42381
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(18, 9),
42384
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(24, 9)
42438
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(24, 9),
42441
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 9)
42511
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !TryGetValueCore(out y);").WithArguments("y", "false").WithLocation(15, 9)
42608
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(15, 13),
42611
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(29, 9),
42614
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(41, 9),
42623
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(51, 9)
42697
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(16, 21),
42706
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 17),
42715
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(42, 17),
42730
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(52, 17)
42873
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue3(out y);").WithArguments("y", "true").WithLocation(17, 9),
42876
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue2(out y);").WithArguments("y", "false").WithLocation(27, 9)
131156
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 9),
131162
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(25, 9)
157067
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
157070
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s1", "true").WithLocation(18, 9)
157109
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
157112
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b && true;").WithArguments("s1", "true").WithLocation(19, 9)
157145
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !M1(out s1);").WithArguments("s1", "true").WithLocation(15, 9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
372
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
: