31 references to WRN_MemberNotNullWhen
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
79nullableWarnings.Add(GetId(ErrorCode.WRN_MemberNotNullWhen)); 477case ErrorCode.WRN_MemberNotNullWhen: 1991case ErrorCode.WRN_MemberNotNullWhen:
FlowAnalysis\NullableWalker.cs (1)
836Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
Generated\ErrorFacts.Generated.cs (1)
242case ErrorCode.WRN_MemberNotNullWhen:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\NullableReferenceTypesTests.cs (25)
23481Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field3", "true").WithLocation(37, 9), 23484Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field4", "true").WithLocation(37, 9) 24314Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "true").WithArguments("field1", "true").WithLocation(31, 12), 24317Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "true").WithArguments("field2", "true").WithLocation(31, 12) 24402Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field1", "true").WithLocation(29, 9), 24405Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field2", "true").WithLocation(29, 9), 24408Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field3", "true").WithLocation(29, 9), 24411Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field4", "true").WithLocation(29, 9) 24458Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "true").WithArguments("field1", "true").WithLocation(29, 16), 24461Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "true").WithArguments("field2", "true").WithLocation(29, 16), 24464Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "true").WithArguments("field3", "true").WithLocation(29, 16) 24547Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field1", "true").WithLocation(21, 13), 24550Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field2", "true").WithLocation(21, 13) 24636Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return field1 == null;").WithArguments("field1", "true").WithLocation(19, 13), 24639Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return !Init();").WithArguments("field1", "true").WithLocation(29, 9), 24642Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return !Init();").WithArguments("field3", "true").WithLocation(29, 9) 24687Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return field1 != null;").WithArguments("field1", "false").WithLocation(23, 13), 24690Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return !Init();").WithArguments("field1", "false").WithLocation(29, 9), 24693Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return !Init();").WithArguments("field3", "false").WithLocation(29, 9) 24899Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field1", "true").WithLocation(23, 17), 24902Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field2", "true").WithLocation(23, 17) 24938Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return field2 == null;").WithArguments("field2", "true").WithLocation(21, 13) 24979Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return true;").WithArguments("field1", "true").WithLocation(24, 9) 25023Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return false;").WithArguments("field1", "false").WithLocation(24, 9), 25026Diagnostic(ErrorCode.WRN_MemberNotNullWhen, "return false;").WithArguments("field4", "false").WithLocation(24, 9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
373case ErrorCode.WRN_MemberNotNullWhen: