37 references to WRN_ParameterConditionallyDisallowsNull
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
50
nullableWarnings.Add(GetId(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
));
477
case ErrorCode.
WRN_ParameterConditionallyDisallowsNull
:
2035
or ErrorCode.
WRN_ParameterConditionallyDisallowsNull
FlowAnalysis\NullableWalker.cs (1)
1336
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.Emit3.UnitTests (2)
Semantics\ExtensionTests.cs (2)
41074
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("o", "true").WithLocation(23, 17),
41077
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("o", "true").WithLocation(37, 13));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\LambdaTests.cs (1)
5022
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("obj", "true").WithLocation(13, 17)
Semantics\NullableReferenceTypesTests.cs (28)
29239
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(11, 13)
29308
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 17)
29340
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 15)
29404
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(13, 17)
29586
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("s", "false").WithLocation(11, 13)
29628
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s", "true").WithLocation(22, 9)
42352
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(18, 9),
42355
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(24, 9)
42409
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(24, 9),
42412
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 9)
42482
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return !TryGetValueCore(out y);").WithArguments("y", "false").WithLocation(15, 9)
42579
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(15, 13),
42582
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(29, 9),
42585
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(41, 9),
42594
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(51, 9)
42668
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("y", "true").WithLocation(16, 21),
42677
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y == null;").WithArguments("y", "true").WithLocation(30, 17),
42686
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return y != null;").WithArguments("y", "false").WithLocation(42, 17),
42701
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return false;").WithArguments("y", "false").WithLocation(52, 17)
42844
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue3(out y);").WithArguments("y", "true").WithLocation(17, 9),
42847
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return TryGetValue2(out y);").WithArguments("y", "false").WithLocation(27, 9)
131072
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(13, 9),
131078
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return true;").WithArguments("s", "true").WithLocation(25, 9)
156952
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
156955
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return (bool)true;").WithArguments("s1", "true").WithLocation(18, 9)
156994
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b;").WithArguments("s1", "true").WithLocation(12, 9),
156997
Diagnostic(ErrorCode.
WRN_ParameterConditionallyDisallowsNull
, "return b && true;").WithArguments("s1", "true").WithLocation(19, 9)
157030
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
: