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
:
2034
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)
47593
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("o", "true").WithLocation(23, 17),
47596
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)
29240
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(11, 13)
29309
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 17)
29341
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 15)
29405
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(13, 17)
29587
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 13)
29629
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s", "true").WithLocation(22, 9)
42353
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(18, 9),
42356
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(24, 9)
42410
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(24, 9),
42413
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 9)
42483
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !TryGetValueCore(out y);").WithArguments("y", "false").WithLocation(15, 9)
42580
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(15, 13),
42583
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(29, 9),
42586
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(41, 9),
42595
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(51, 9)
42669
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(16, 21),
42678
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 17),
42687
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(42, 17),
42702
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(52, 17)
42845
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue3(out y);").WithArguments("y", "true").WithLocation(17, 9),
42848
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue2(out y);").WithArguments("y", "false").WithLocation(27, 9)
131094
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 9),
131100
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(25, 9)
157005
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
157008
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s1", "true").WithLocation(18, 9)
157047
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
157050
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b && true;").WithArguments("s1", "true").WithLocation(19, 9)
157083
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !M1(out s1);").WithArguments("s1", "true").WithLocation(15, 9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
384
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
: