413 references to WRN_NullReferenceArgument
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
31nullableWarnings.Add(GetId(ErrorCode.WRN_NullReferenceArgument)); 434case ErrorCode.WRN_NullReferenceArgument: 1948or ErrorCode.WRN_NullReferenceArgument
FlowAnalysis\NullableWalker.cs (1)
2431ReportDiagnostic(ErrorCode.WRN_NullReferenceArgument, location,
Generated\ErrorFacts.Generated.cs (1)
198case ErrorCode.WRN_NullReferenceArgument:
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (55)
Attributes\AttributeTests_NullablePublicOnly.cs (1)
258Diagnostic(ErrorCode.WRN_NullReferenceArgument, "A.F").WithArguments("o", "void A.M(object o)").WithLocation(6, 13));
Semantics\CollectionExpressionTests.cs (11)
31798Diagnostic(ErrorCode.WRN_NullReferenceArgument, "[maybeNull]").WithArguments("c", "void M<string?>(ref string? t, MyCollection<string?> c)").WithLocation(10, 18), 31804Diagnostic(ErrorCode.WRN_NullReferenceArgument, "[maybeNull]").WithArguments("c", "void M<string?>(ref string? t, MyCollection<string?> c)").WithLocation(11, 16), 31807Diagnostic(ErrorCode.WRN_NullReferenceArgument, "[notNull]").WithArguments("c", "void M<string?>(ref string? t, MyCollection<string?> c)").WithLocation(12, 18) 32025Diagnostic(ErrorCode.WRN_NullReferenceArgument, "maybeNull").WithArguments("t", "void CUnannotated<object>.Add(object t)").WithLocation(17, 32)); 32057Diagnostic(ErrorCode.WRN_NullReferenceArgument, "maybeNull").WithArguments("t", "void C.Add<object>(object t)").WithLocation(8, 13)); 32106Diagnostic(ErrorCode.WRN_NullReferenceArgument, "maybeNull").WithArguments("t", "void CUnannotated<object>.Add(object t)").WithLocation(17, 32)); 32139Diagnostic(ErrorCode.WRN_NullReferenceArgument, "maybeNull").WithArguments("t", "void C.Add<object>(object t)").WithLocation(8, 13)); 32183Diagnostic(ErrorCode.WRN_NullReferenceArgument, "maybeNull").WithArguments("t", "void CUnannotated<object>.Add(object t)").WithLocation(14, 28)); 32232Diagnostic(ErrorCode.WRN_NullReferenceArgument, "maybeNull").WithArguments("u", "void CUnannotated<object?>.Add<object>(object u)").WithLocation(14, 34)); 43128Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("c", "IEnumerator<int> Extensions.GetEnumerator<int>(MyCollection<int> c)").WithLocation(15, 25)); 43268Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "IEnumerable<string> Program.F<string>(string x)").WithLocation(16, 26));
Semantics\ExtensionOperatorsTests.cs (15)
3198Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "C1 extension(C1).operator -(C1 x)").WithLocation(23, 14) 3546Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "bool extension(C1).operator true(C1 x)").WithLocation(20, 13) 8866Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "C1 extension(C1).operator --(C1 x)").WithLocation(23, 15) 9326Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "extension(C1)").WithLocation(27, 20), 9528Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "extension(C1Base)").WithLocation(27, 20), 17067Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "C1 extension(C1).operator -(C1 x, C1 y)").WithLocation(25, 13), 17070Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("y", "C1 extension(C1).operator -(C1 x, C1 y)").WithLocation(26, 17) 17628Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "bool extension(C1).operator false(C1 x)").WithLocation(28, 13), 17631Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "C1 extension(C1).operator &(C1 x, C1 y)").WithLocation(28, 13), 17634Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("y", "C1 extension(C1).operator &(C1 x, C1 y)").WithLocation(29, 18) 25573Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "C1 extension(C1).operator -(C1 x, C1 y)").WithLocation(25, 13), 25576Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("y", "C1 extension(C1).operator -(C1 x, C1 y)").WithLocation(26, 18) 25931Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "extension(C1)").WithLocation(25, 13), 25934Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("y", "void extension(C1).operator -=(C1 y)").WithLocation(26, 18) 26130Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "extension(C1Base)").WithLocation(27, 18),
Semantics\ExtensionTests.cs (16)
12916Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "extension(object)").WithLocation(4, 1)); 39580Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object)").WithLocation(4, 1)); 39809Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull1").WithArguments("o2", "void extension(object).M(object o2)").WithLocation(6, 5), 39812Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull3").WithArguments("o2", "void extension(object).M2(object o2)").WithLocation(15, 11)); 40003Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object)").WithLocation(4, 9)); 40404Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object)").WithLocation(4, 16)); 40437Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object)").WithLocation(4, 21)); 40841Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object)").WithLocation(5, 23)); 41104Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object?)").WithLocation(4, 1)); 41889Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o2").WithArguments("o", "void C.M(object o)").WithLocation(7, 29)); 41918Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o = null").WithArguments("o", "object C.M(object o)").WithLocation(4, 5), 42007Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("o", "void C.M(object o)").WithLocation(4, 34)); 42228Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "void extension(MyCollection).Add(object o)").WithLocation(7, 39)); 42261Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "void extension(MyCollection).Add(object o)").WithLocation(7, 19)); 42291Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "void E.Add(MyCollection c, object o)").WithLocation(7, 19)); 42691Diagnostic(ErrorCode.WRN_NullReferenceArgument, "cNull").WithArguments("c", "extension(C)").WithLocation(7, 11));
Semantics\ExtensionTests2.cs (3)
1053Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull").WithArguments("o", "extension(object)").WithLocation(4, 5), 1056Diagnostic(ErrorCode.WRN_NullReferenceArgument, "oNull2").WithArguments("o", "int E.get_P(object o)").WithLocation(7, 9) 1418Diagnostic(ErrorCode.WRN_NullReferenceArgument, "sNull").WithArguments("o", "extension(object)").WithLocation(4, 5));
Semantics\ParamsCollectionTests.cs (8)
15351Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("paramsParameter", "void Program.Test1(params MyCollection paramsParameter)").WithLocation(18, 15), 15354Diagnostic(ErrorCode.WRN_NullReferenceArgument, "z").WithArguments("paramsParameter", "void Program.Test1(params MyCollection paramsParameter)").WithLocation(20, 15), 15357Diagnostic(ErrorCode.WRN_NullReferenceArgument, "v").WithArguments("paramsParameter", "void Program.Test1(params MyCollection paramsParameter)").WithLocation(20, 21), 15360Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("paramsParameter", "void Program.Test1(params MyCollection paramsParameter)").WithLocation(21, 18), 15363Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("paramsParameter", "void Program.Test2(params string[] paramsParameter)").WithLocation(27, 15), 15366Diagnostic(ErrorCode.WRN_NullReferenceArgument, "z").WithArguments("paramsParameter", "void Program.Test2(params string[] paramsParameter)").WithLocation(29, 15), 15369Diagnostic(ErrorCode.WRN_NullReferenceArgument, "v").WithArguments("paramsParameter", "void Program.Test2(params string[] paramsParameter)").WithLocation(29, 21), 15372Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("paramsParameter", "void Program.Test2(params string[] paramsParameter)").WithLocation(30, 18)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (1)
16723Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void C1<object>.operator +=(object x)").WithLocation(18, 15)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (347)
Semantics\LocalFunctionTests.cs (1)
6199Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t1").WithArguments("t", "void local2(T t)").WithLocation(13, 16));
Semantics\NullableReferenceTypesTests.cs (344)
793Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("index", "int C<object>.this[object index]").WithLocation(13, 15) 824Diagnostic(ErrorCode.WRN_NullReferenceArgument, "input").WithArguments("index", "int C<object>.this[object index]").WithLocation(11, 14), 856Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("index", "int C<object>.this[object index]").WithLocation(13, 19) 1024Diagnostic(ErrorCode.WRN_NullReferenceArgument, ".Field").WithArguments("s", "void Extensions.Extension(string s, object? o)").WithLocation(13, 11) 1361Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "C C.operator ++(C x)").WithLocation(6, 9) 5464Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void Program.F(object x)").WithLocation(7, 11)); 5490Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void Program.F(object x)").WithLocation(12, 11)); 5515Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void Program.F(object x)").WithLocation(6, 11)); 5540Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void Program.F(object x)").WithLocation(11, 11)); 7728Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void C.OmittedMethod(string x)").WithLocation(6, 23) 7752Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void Collection.Add(string x)").WithLocation(7, 32) 8271Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c2").WithArguments("i", "C.implicit operator int(C i)").WithLocation(11, 25) 9163Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("o", "object? B2.F(object o)").WithLocation(43, 18), 9169Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("o", "object? C2.F(object o)").WithLocation(51, 18), 9179Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("o", "object? B2.F(object o)").WithLocation(43, 18), 9185Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("o", "object? C2.F(object o)").WithLocation(51, 18), 9380Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "object C1.F(object x, object y)").WithLocation(15, 20), 9383Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "object C1.G(object x, object y)").WithLocation(16, 20), 9386Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "object? A.F(object x, object? y)").WithLocation(19, 18), 9398Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "object? A.F(object x, object? y)").WithLocation(27, 18), 11083Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nullableField").WithArguments("x", "C.C(string[] x)").WithLocation(27, 15) 18616Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y28").WithArguments("x", "CL1 CL1.this[CL1 x]").WithLocation(280, 13), 18734Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("p", "void C.M1(CL1 p)").WithLocation(12, 12), 18740Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("p", "void C.M1(CL1 p)").WithLocation(19, 12), 18761Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y8").WithArguments("p1", "void C.M6(CL1 p1, CL1? p2)").WithLocation(65, 24), 18764Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y9").WithArguments("p1", "void C.M7(params CL1[] p1)").WithLocation(72, 16), 18767Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x10").WithArguments("p1", "void C.M7(params CL1[] p1)").WithLocation(77, 12), 18770Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x11").WithArguments("p1", "void C.M8(CL1 p1, params CL1[] p2)").WithLocation(84, 12), 18773Diagnostic(ErrorCode.WRN_NullReferenceArgument, "z11").WithArguments("p2", "void C.M8(CL1 p1, params CL1[] p2)").WithLocation(84, 22), 18776Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x12").WithArguments("p2", "void C.M8(CL1 p1, params CL1[] p2)").WithLocation(89, 16) 18893Diagnostic(ErrorCode.WRN_NullReferenceArgument, "z").WithArguments("y", "void C.G(I<object> x, params I<object?>[] y)").WithLocation(10, 20), 18899Diagnostic(ErrorCode.WRN_NullReferenceArgument, "w").WithArguments("y", "void C.G(I<object> x, params I<object?>[] y)").WithLocation(10, 23), 18908Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("y", "void C.G(I<object> x, params I<object?>[] y)").WithLocation(13, 14), 19002Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x = null").WithArguments("x", "int C.F(object x)").WithLocation(7, 19), 19047Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x = null").WithArguments("x", "int C.F(object x)").WithLocation(7, 23), 19085Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x = null").WithArguments("x", "object C.F(object x)").WithLocation(7, 15), 19120Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x = null").WithArguments("x", "int C.F(object x)").WithLocation(6, 17), 19255Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("y", "void C.G(object? x = null, object y)").WithLocation(5, 14)); 19279Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("x", "void C.G(params object[] x, params object[] y)").WithLocation(5, 11), 19282Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b").WithArguments("y", "void C.G(params object[] x, params object[] y)").WithLocation(5, 14), 19285Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("y", "void C.G(params object[] x, params object[] y)").WithLocation(5, 17)); 19324Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void C.F2(params object x)").WithLocation(5, 19), 19327Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void C.F3(params object x, params object[] y)").WithLocation(7, 19), 19330Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("y", "void C.F3(params object x, params object[] y)").WithLocation(8, 22)); 19608Diagnostic(ErrorCode.WRN_NullReferenceArgument, "z").WithArguments("z", "void C.G(out object x, ref object y, in object z)").WithLocation(5, 28) 20800Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c").WithArguments("c", "C.implicit operator bool(C? c)").WithLocation(9, 18), 20803Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c1").WithArguments("c1", "bool C.operator ==(C? c1, C? c2)").WithLocation(15, 18), 20806Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c2").WithArguments("c1", "bool C.operator !=(C? c1, C? c2)").WithLocation(16, 13) 27504Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o2").WithArguments("o2", "int C.Test(object o, object o2)").WithLocation(11, 41), 27507Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "int C.Test(object o, object o2)").WithLocation(13, 23), 27510Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "int C.Test(object o, object o2)").WithLocation(21, 46), 27513Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "int C.Test(object o, object o2)").WithLocation(22, 47), 27516Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "int C.Test(object o, object o2)").WithLocation(23, 23) 27566Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o2").WithArguments("o2", "void C.Test(object o, object o2)").WithLocation(12, 25), 27569Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "void C.Test(object o, object o2)").WithLocation(18, 22), 27572Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "void C.Test(object o, object o2)").WithLocation(28, 22), 27575Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "void C.Test(object o, object o2)").WithLocation(31, 22), 27578Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "void C.Test(object o, object o2)").WithLocation(34, 22) 30008Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("c", "bool C.IsNull(C c)").WithLocation(12, 20), 30252Diagnostic(ErrorCode.WRN_NullReferenceArgument, "Property").WithArguments("one", "C C.operator +(C one, C other)").WithLocation(10, 9) 33036Diagnostic(ErrorCode.WRN_NullReferenceArgument, "Prop").WithArguments("t", "void C<T>.M1(T t)").WithLocation(12, 12), 33039Diagnostic(ErrorCode.WRN_NullReferenceArgument, "Prop").WithArguments("t", "void C<T>.M1(T t)").WithLocation(18, 12)); 34378Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(C?)null").WithArguments("s", "void C.M1(string s)").WithLocation(13, 12)); 34406Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(C?)null").WithArguments("s", "void C.M1(string s)").WithLocation(14, 12)); 34434Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(string?)new C()").WithArguments("s", "void C.M1(string s)").WithLocation(13, 12), 34437Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(string?)(C?)null").WithArguments("s", "void C.M1(string s)").WithLocation(14, 12)); 34649Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(B?)null").WithArguments("a", "void A.DisallowNull(A? a)").WithLocation(23, 24), 34652Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(E?)null").WithArguments("a", "void A.DisallowNull(A? a)").WithLocation(76, 24), 34655Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(F?)null").WithArguments("a", "void A.DisallowNull(A? a)").WithLocation(94, 24), 34658Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(G?)null").WithArguments("a", "void A.DisallowNull(A? a)").WithLocation(112, 24), 34661Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(H?)null").WithArguments("a", "void A.DisallowNull(A? a)").WithLocation(130, 24) 34707Diagnostic(ErrorCode.WRN_NullReferenceArgument, "new C()").WithArguments("s", "void C.M1(string s)").WithLocation(29, 12), 34710Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(C?)null").WithArguments("s", "void C.M1(string s)").WithLocation(30, 12)); 40858Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c2").WithArguments("other", "CLeft? CLeft.operator +(CLeft one, CLeft other)").WithLocation(11, 21), 40861Diagnostic(ErrorCode.WRN_NullReferenceArgument, "Property").WithArguments("one", "CNone? CNone.operator +(CNone one, CNone other)").WithLocation(32, 9), 40864Diagnostic(ErrorCode.WRN_NullReferenceArgument, "Property").WithArguments("one", "CNone? CNone.operator +(CNone one, CNone other)").WithLocation(33, 9), 40867Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c2").WithArguments("other", "CNone? CNone.operator +(CNone one, CNone other)").WithLocation(33, 21) 41120Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", "string C.this[string s]").WithLocation(6, 17) 41352Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s1").WithArguments("s0", "void Program.M0(string s0)").WithLocation(8, 12) 41375Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("t", "void Program.M0<T>(T t)").WithLocation(8, 15) 41490Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s1").WithArguments("s0", "void Program.M0(params string[]? s0)").WithLocation(8, 12) 41649Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("t", "void Program<T>.M0(T t)").WithLocation(9, 12)); 41691Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t?.Value").WithArguments("t", "void Program<T>.M0(T t)").WithLocation(14, 12), 41694Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("t", "void Program<T>.M0(T t)").WithLocation(24, 12), 41697Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t.Value").WithArguments("t", "void Program<T>.M0(T t)").WithLocation(27, 12) 41732Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("s", "void C1<T>.Test(T s)").WithLocation(15, 14) 41885Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("t", "void Program<T>.M0(T t)").WithLocation(9, 12) 41983Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s1").WithArguments("s0", "void Program.M0<string>(params string[]? s0)").WithLocation(8, 20) 43897Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F1<T?>(T? t)").WithLocation(20, 19), 43903Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F2<T?>(T? t)").WithLocation(21, 19), 43906Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F3<T>(T? t)").WithLocation(22, 19), 43909Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F1<T?>(T? t)").WithLocation(26, 19), 43915Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F2<T?>(T? t)").WithLocation(27, 19), 43918Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F3<T>(T? t)").WithLocation(28, 19), 44086Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F1<T?>(T? t)").WithLocation(20, 19), 44092Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F2<T?>(T? t)").WithLocation(21, 19), 44095Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F3<T>(T? t)").WithLocation(22, 19), 44098Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F1<T?>(T? t)").WithLocation(26, 19), 44104Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F2<T?>(T? t)").WithLocation(27, 19), 44107Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F3<T>(T? t)").WithLocation(28, 19), 44178Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F1<T>(T t)").WithLocation(20, 22), 44181Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F2<T>(T t)").WithLocation(21, 22), 44184Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void Program.F3<T>(T? t)").WithLocation(22, 22), 44187Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F1<T>(T t)").WithLocation(26, 22), 44190Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F2<T>(T t)").WithLocation(27, 22), 44193Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void Program.F3<T>(T? t)").WithLocation(28, 22), 44235Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s1").WithArguments("s", "void Program.F1(string s)").WithLocation(12, 19), 44238Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s1").WithArguments("s", "void Program.F2(string? s)").WithLocation(13, 19), 44241Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s2").WithArguments("s", "void Program.F1(string s)").WithLocation(17, 19), 44244Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s2").WithArguments("s", "void Program.F2(string? s)").WithLocation(18, 19)); 44311Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void A.F2<object>(object? t)").WithLocation(9, 12) 44348Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", "void Base.M(string? s)").WithLocation(6, 22) 45137Diagnostic(ErrorCode.WRN_NullReferenceArgument, "Property").WithArguments("one", "C? C.operator +(C? one, C other)").WithLocation(10, 9), 45182Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c").WithArguments("other", "C? C.operator +(C? one, C? other)").WithLocation(10, 21), 45536Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", "string? C.this[string? s]").WithLocation(6, 17) 45989Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "T Program.F1<T>(T t)").WithLocation(19, 15), 45995Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "T Program.F2<T>(T t)").WithLocation(20, 15), 46001Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "T? Program.F3<T>(T t)").WithLocation(21, 15), 46007Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "T Program.F1<T>(T t)").WithLocation(25, 15), 46013Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "T Program.F2<T>(T t)").WithLocation(26, 15), 46019Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "T? Program.F3<T>(T t)").WithLocation(27, 15), 46121Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "T Program.F1<T>(T t)").WithLocation(19, 15), 46127Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "T Program.F2<T>(T t)").WithLocation(20, 15), 46133Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "T? Program.F3<T>(T t)").WithLocation(21, 15), 46139Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "T Program.F1<T>(T t)").WithLocation(25, 15), 46145Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "T Program.F2<T>(T t)").WithLocation(26, 15), 46151Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "T? Program.F3<T>(T t)").WithLocation(27, 15), 46666Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "void Program.F1<T>(T t, out T t2)").WithLocation(26, 15), 46672Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "void Program.F2<T>(T t, out T t2)").WithLocation(29, 15), 46678Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t2 : default").WithArguments("t", "void Program.F3<T>(T t, out T? t2)").WithLocation(32, 15), 46684Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "void Program.F1<T>(T t, out T t2)").WithLocation(37, 15), 46690Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "void Program.F2<T>(T t, out T t2)").WithLocation(40, 15), 46696Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? t3 : default").WithArguments("t", "void Program.F3<T>(T t, out T? t2)").WithLocation(43, 15), 47387Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "T Program.F1<T>(T t)").WithLocation(19, 22), 47390Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "T Program.F2<T>(T t)").WithLocation(20, 22), 47393Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "T? Program.F3<T>(T t)").WithLocation(21, 22), 47396Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "T Program.F1<T>(T t)").WithLocation(25, 22), 47399Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "T Program.F2<T>(T t)").WithLocation(26, 22), 47402Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "T? Program.F3<T>(T t)").WithLocation(27, 22)); 48853Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t1").WithArguments("t", "void Program.E2<T?>(T? t)").WithLocation(14, 13), 54063Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c1?.M1(x = 0)").WithArguments("c", "C." + conversionKind + " operator B(C c)").WithLocation(9, 19), 54180Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c1?.M1(x = 0)").WithArguments("c", "B." + conversionKind + " operator B(C? c)").WithLocation(13, 19), 54339Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("t", "string C<T>.M2(T t)").WithLocation(20, 18), 55998Diagnostic(ErrorCode.WRN_NullReferenceArgument, "@bool ? a : b").WithArguments("t2", "I C.M1<I>(I t1, I t2)").WithLocation(9, 15) 58996Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("y", "void C.M2(int[] x, int[] y)").WithLocation(11, 15)); 61519Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("o", "C.C(object o)").WithLocation(6, 23)); 61649Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "void ITest28.Add(ITest28 x)").WithLocation(9, 34) 61760Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("item", "void List<A<object>>.Add(A<object> item)").WithLocation(10, 13), 62341Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y3.p1").WithArguments("x", "CL1? CL1.M1(CL1 x)").WithLocation(27, 29)); 64226Diagnostic(ErrorCode.WRN_NullReferenceArgument, "e").WithArguments("param", "void Program.M1(IEnumerable<string> param)").WithLocation(7, 14) 65481Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", "void C.M0(string s)").WithLocation(38, 40)); 68272Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", "void M(CustomHandler c, string s)").WithLocation(5, 19 + expression.IndexOf("s.ToString")) 68343Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", $"CustomHandler.CustomHandler(int literalLength, int formattedCount, string s{(validityParameter ? ", out bool success" : "")})").WithLocation(6, 3) 68379Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("o", (useBoolReturns ? "bool" : "void") + " CustomHandler.AppendFormatted(object o)").WithLocation(6, 6) 68512Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("t", "CustomHandler.CustomHandler(int literalLength, int formattedCount, string t)").WithLocation(7, 3) 68699Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s1", "void M(string s1, CustomHandler c1, string s2)").WithLocation(8, 3), 68733Diagnostic(ErrorCode.WRN_NullReferenceArgument, "GetNullableString()").WithArguments("s", "CustomHandler.CustomHandler(int literalLength, int formattedCount, string s)").WithLocation(6, 3) 68769Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("t", "CustomHandler.CustomHandler(int literalLength, int formattedCount, string t)").WithLocation(8, 7) 68901Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s1", "string C.this[string s1, CustomHandler c1, string s2]").WithLocation(9, 7), 69136Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b").WithArguments("a", "CustomHandler.CustomHandler(int literalLength, int formattedCount, A a)").WithLocation(6, 3) 72197Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y1").WithArguments("y", "CL0 CL0.operator +(string? x, CL0 y)").WithLocation(10, 24), 72200Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "CL1? CL1.operator +(string x, CL1? y)").WithLocation(16, 18), 72206Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y3").WithArguments("y", "CL0 CL0.operator +(string? x, CL0 y)").WithLocation(21, 23), 72209Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x4 + y4").WithArguments("x", "CL2 CL2.operator +(CL1 x, CL2 y)").WithLocation(26, 18) 72263Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y2").WithArguments("y", "CL1? CL1.operator +(string x, CL1? y)").WithLocation(19, 23) 72316Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x3 + y3").WithArguments("x", "CL2 CL2.operator +(CL0 x, CL2 y)").WithLocation(28, 18), 72368Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "bool CL0.operator false(CL0 x)").WithLocation(10, 19), 72371Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL0 CL0.operator &(CL0 x, CL0? y)").WithLocation(10, 19) 72413Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "bool CL0.operator false(CL0 x)").WithLocation(10, 19), 72416Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y1").WithArguments("y", "CL0 CL0.operator &(CL0? x, CL0 y)").WithLocation(10, 25) 72497Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "bool CL0.operator true(CL0 x)").WithLocation(10, 19) 72583Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1 && y1").WithArguments("x", "bool CL0.operator true(CL0 x)").WithLocation(10, 19), 72586Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1 && y1").WithArguments("x", "CL0 CL0.operator |(CL0 x, CL0 y)").WithLocation(10, 19) 72749Diagnostic(ErrorCode.WRN_NullReferenceArgument, "!y1").WithArguments("y", "CL0 CL0.operator &(CL0? x, CL0 y)").WithLocation(10, 25) 73235Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL0 CL0.operator !(CL0 x)").WithLocation(10, 19), 73375Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL0.implicit operator CL1(CL0 x)").WithLocation(10, 18), 73378Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "CL0.implicit operator int(CL0 x)").WithLocation(15, 18), 74104Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("o", "void E.F1B(object o)").WithLocation(11, 9), 74268Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL0 CL0.operator ++(CL0 x)").WithLocation(10, 21), 74271Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "CL0 CL0.operator ++(CL0 x)").WithLocation(16, 18), 74367Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL0 CL0.operator ++(CL0 x)").WithLocation(10, 21), 74370Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "CL0 CL0.operator ++(CL0 x)").WithLocation(16, 18), 74474Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1[0]").WithArguments("x", "CL0 CL0.operator ++(CL0 x)").WithLocation(10, 21), 74477Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2[0]").WithArguments("x", "CL0 CL0.operator ++(CL0 x)").WithLocation(16, 18), 74586Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "C? A.operator ++(A x)").WithLocation(10, 19), 74589Diagnostic(ErrorCode.WRN_NullReferenceArgument, "++x1").WithArguments("x", "C.implicit operator B(C x)").WithLocation(10, 17) 74684Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("c", "Convertible.implicit operator int(Convertible c)").WithLocation(10, 29) 74726Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL1.implicit operator CL0(CL1 x)").WithLocation(10, 19) 74768Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y1").WithArguments("y", "CL1 CL0.operator +(CL0 x, CL0 y)").WithLocation(10, 25) 74830Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL1 CL0.operator +(CL0 x, CL0? y)").WithLocation(10, 19), 74833Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "CL1 CL0.operator +(CL0 x, CL0? y)").WithLocation(17, 18), 74938Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x4").WithArguments("x", "CL1? CL0.operator +(CL0 x, CL0? y)").WithLocation(29, 19), 74941Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x4 += y4").WithArguments("x", "CL1.implicit operator CL0(CL1 x)").WithLocation(29, 19), 74944Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x5 += y5").WithArguments("x", "CL1.implicit operator CL0(CL1 x)").WithLocation(36, 9), 75040Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1").WithArguments("x", "CL1.implicit operator CL0(CL1 x)").WithLocation(10, 19) 75108Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x1[0]").WithArguments("x", "CL1.implicit operator CL0(CL1 x)").WithLocation(10, 19) 77374Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x21").WithArguments("x3", "void CL1.M3(Action x3)").WithLocation(15, 18), 77401Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x21").WithArguments("x3", "void CL1.M3(Action x3)").WithLocation(15, 18), 77569Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x21").WithArguments("x3", "void CL1.M3(Action x3)").WithLocation(12, 18), 79070Diagnostic(ErrorCode.WRN_NullReferenceArgument, "null as string").WithArguments("s", "void Extensions.F(string s)").WithLocation(14, 10), 79076Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(p != null) ? p.MiddleName : null").WithArguments("s", "void Extensions.F(string s)").WithLocation(17, 10), 79082Diagnostic(ErrorCode.WRN_NullReferenceArgument, "p.MiddleName ?? null").WithArguments("s", "void Extensions.F(string s)").WithLocation(18, 10) 79137Diagnostic(ErrorCode.WRN_NullReferenceArgument, "null as string").WithArguments("name", "void Program.G(string name)").WithLocation(15, 11), 79146Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(p != null) ? p.MiddleName : null").WithArguments("name", "void Program.G(string name)").WithLocation(19, 11), 79152Diagnostic(ErrorCode.WRN_NullReferenceArgument, "p.MiddleName ?? null").WithArguments("name", "void Program.G(string name)").WithLocation(20, 11) 79581Diagnostic(ErrorCode.WRN_NullReferenceArgument, "G(t!)").WithArguments("t", "T? C<T>.F(T t)").WithLocation(7, 11), 79584Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("t", "T? C<T>.G(T t)").WithLocation(8, 13)); 79846Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("key", "void C<int>.Add(C<object?> key, params C<object?>[] value)").WithLocation(9, 28), 80372Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("a", "A.implicit operator B(A a)").WithLocation(12, 14)); 81044Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("s", "void C.G(string s)").WithLocation(14, 15)); 81148Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "void C.F1(object o)").WithLocation(9, 16)); 81264Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "void C.G(object o)").WithLocation(9, 11)); 81294Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("s", "string? C.F(string s)").WithLocation(8, 11), 81297Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("s", "string? C.F(string s)").WithLocation(11, 11)); 81754Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F0<T>(T t = default(T))").WithLocation(39, 15), 81757Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F6<T, T>(T t = default(T))").WithLocation(41, 18), 81769Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F0<T>(T t = default(T))").WithLocation(66, 15), 81772Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F3<T>(T t = default(T))").WithLocation(69, 15), 81775Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F6<T, T>(T t = default(T))").WithLocation(72, 18), 81793Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F0<T>(T t = default(T))").WithLocation(91, 15), 81796Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F5<T>(T t = default(T))").WithLocation(93, 15), 81799Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F6<T, T>(T t = default(T))").WithLocation(95, 18), 81802Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F0<T>(T t = default(T))").WithLocation(100, 15), 81805Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void P.F6<T, U>(T t = default(T))").WithLocation(102, 18) 83435Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("a", "A.implicit operator C(A a)").WithLocation(13, 13)); 83528Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b2").WithArguments("a", "A.explicit operator C(A a)").WithLocation(19, 26), 83531Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b2").WithArguments("a", "A.explicit operator C(A a)").WithLocation(20, 27)); 83651Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b").WithArguments("a", "A.explicit operator S(A a)").WithLocation(12, 26), 83654Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b").WithArguments("a", "A.explicit operator S(A a)").WithLocation(13, 27)); 83738Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("a", "A.implicit operator C(A a)").WithLocation(13, 13), 83744Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("a", "A.implicit operator C(A a)").WithLocation(14, 13)); 83772Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("c", "C.implicit operator B(C c)").WithLocation(12, 22)); 85330Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? y : null!").WithArguments("item4", "(object?, object, object?, object, object?, (object, object?), object, object, object?, object).ValueTuple(object? item1, object item2, object? item3, object item4, object? item5, (object, object?) item6, object item7, (object, object?, object) rest)").WithLocation(10, 13), 85333Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? y : null!").WithArguments("item1", "(object, object?).ValueTuple(object item1, object? item2)").WithLocation(12, 45), 85336Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? y : null!").WithArguments("item3", "(object, object?, object).ValueTuple(object item1, object? item2, object item3)").WithLocation(14, 71), 85485Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("item4", "(object?, object, object?, object, object?, (object, object?), object, object, object?, object).ValueTuple(object? item1, object item2, object? item3, object item4, object? item5, (object, object?) item6, object item7, (object, object?, object) rest)").WithLocation(10, 13), 85996Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? y : x").WithArguments("item4", "(object?, object, object?, object, object?, (object, object?), object, object, object?, object).ValueTuple(object? item1, object item2, object? item3, object item4, object? item5, (object, object?) item6, object item7, (object, object?, object) rest)").WithLocation(10, 13), 85999Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? y : x").WithArguments("item1", "(object, object?).ValueTuple(object item1, object? item2)").WithLocation(12, 45), 86002Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b ? y : x").WithArguments("item3", "(object, object?, object).ValueTuple(object item1, object? item2, object item3)").WithLocation(13, 73), 86005Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("item7", "(object?, object, object?, object, object?, (object, object?), object, object, object?, object).ValueTuple(object? item1, object item2, object? item3, object item4, object? item5, (object, object?) item6, object item7, (object, object?, object) rest)").WithLocation(14, 20), 89820Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("a", "A2.implicit operator B?(A2 a)").WithLocation(32, 27), 89826Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("a", "A2.implicit operator B?(A2 a)").WithLocation(33, 28), 89832Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x4").WithArguments("a", "A4.implicit operator B(A4 a)").WithLocation(48, 27), 89835Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x4").WithArguments("a", "A4.implicit operator B(A4 a)").WithLocation(49, 28), 91868Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("a", "IEnumerator<string> Extensions.GetEnumerator(A a)").WithLocation(8, 26)); 92014Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("a", "IEnumerator<string> Extensions.GetEnumerator(A? a)").WithLocation(9, 26)); 92371Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("a", "IAsyncEnumerator<string> Extensions.GetAsyncEnumerator(A a)").WithLocation(8, 32) 92518Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a").WithArguments("a", "IAsyncEnumerator<string> Extensions.GetAsyncEnumerator(A? a)").WithLocation(9, 32) 94704Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a.F").WithArguments("s", "void Program.G(string s)").WithLocation(10, 11), 94707Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b.F").WithArguments("s", "void Program.G(string s)").WithLocation(13, 11)); 94767Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a.P").WithArguments("s", "void Program.G(string s)").WithLocation(9, 11), 94770Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b.P").WithArguments("s", "void Program.G(string s)").WithLocation(12, 11)); 94799Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a.P").WithArguments("s", "void Program.G(string s)").WithLocation(9, 11), 94802Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b.P").WithArguments("s", "void Program.G(string s)").WithLocation(12, 11)); 94835Diagnostic(ErrorCode.WRN_NullReferenceArgument, "this.P").WithArguments("s", "void A.F(string s)").WithLocation(17, 11), 94838Diagnostic(ErrorCode.WRN_NullReferenceArgument, "base.P").WithArguments("s", "void A.F(string s)").WithLocation(19, 11), 94841Diagnostic(ErrorCode.WRN_NullReferenceArgument, "P").WithArguments("s", "void A.F(string s)").WithLocation(9, 11)); 105577Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void Test2.M2(ValueType x)").WithLocation(27, 12), 105583Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void Test3.M2(object x)").WithLocation(47, 12), 105649Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void Test2.M2(ValueType x)").WithLocation(15, 12), 105655Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "void Test3.M2(object x)").WithLocation(30, 12), 109693Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t1").WithArguments("o", "void C.F(object o)").WithLocation(8, 18), 109699Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(object)t1").WithArguments("o", "void C.F(object o)").WithLocation(9, 18), 109705Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t4").WithArguments("o", "void C.F(object o)").WithLocation(26, 18), 109711Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(object)t4").WithArguments("o", "void C.F(object o)").WithLocation(27, 18), 110182Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(object)t1").WithArguments("o", "void C.F(object o)").WithLocation(8, 11) 111503Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("t", "void I<object>.F(object t)").WithLocation(11, 14)); 111539Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("t", "void A<object>.F(object t)").WithLocation(11, 14)); 115163Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("y", "void E.F2(C x, C y)").WithLocation(13, 22), 115166Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void E.F2(C x, C y)").WithLocation(14, 9), 115169Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("y", "void E.F2(C x, C y)").WithLocation(14, 14)); 115600Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void E.F(C x)").WithLocation(12, 12)); 118417Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("x", "object Outer.M1<object>(object x, object y)").WithLocation(6, 12) 119084Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x0").WithArguments("a", "void Outer.M2(object a)").WithLocation(6, 12) 119106Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x0").WithArguments("a", "void Outer.M2(in object a)").WithLocation(6, 12) 123728Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("t", "void C<object>.F(object t)").WithLocation(12, 13), 123731Diagnostic(ErrorCode.WRN_NullReferenceArgument, "z").WithArguments("t", "void C<object>.F(object t)").WithLocation(13, 13), 124967Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a1.F").WithArguments("o", "void Program.F(object o)").WithLocation(12, 18), 124970Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b1.F").WithArguments("o", "void Program.F(object o)").WithLocation(14, 18), 124976Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a2.F").WithArguments("o", "void Program.F(object o)").WithLocation(19, 18), 124979Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b2.F").WithArguments("o", "void Program.F(object o)").WithLocation(21, 18)); 125020Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a1.F").WithArguments("o", "void Program.F(object o)").WithLocation(12, 18), 125023Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b1.F").WithArguments("o", "void Program.F(object o)").WithLocation(14, 18), 125029Diagnostic(ErrorCode.WRN_NullReferenceArgument, "a2.F").WithArguments("o", "void Program.F(object o)").WithLocation(19, 18), 125032Diagnostic(ErrorCode.WRN_NullReferenceArgument, "b2.F").WithArguments("o", "void Program.F(object o)").WithLocation(21, 18)); 128829Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nc").WithArguments("c", "S.implicit operator S(C c)").WithLocation(30, 30), 128832Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nc").WithArguments("c", "S.implicit operator S(C c)").WithLocation(35, 25)); 128897Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nc").WithArguments("c", "S.implicit operator S?(C c)").WithLocation(32, 30), 128903Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nc").WithArguments("c", "S.implicit operator S?(C c)").WithLocation(37, 25), 129520Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nt").WithArguments("t", "S<T>.implicit operator S<T>(T t)").WithLocation(27, 33), 129523Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nt").WithArguments("t", "S<T>.implicit operator S<T>(T t)").WithLocation(32, 28)); 129585Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nt").WithArguments("t", "S<T>.implicit operator S<T>?(T t)").WithLocation(29, 33), 129591Diagnostic(ErrorCode.WRN_NullReferenceArgument, "nt").WithArguments("t", "S<T>.implicit operator S<T>?(T t)").WithLocation(34, 28), 132200Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c1").WithArguments("c", "C C.GetC(C c)").WithLocation(19, 31)); 132364Diagnostic(ErrorCode.WRN_NullReferenceArgument, "c1").WithArguments("c1", "C C.M2(C c1)").WithLocation(6, 19)); 133913Diagnostic(ErrorCode.WRN_NullReferenceArgument, "p").WithArguments("p", "void E.Deconstruct<object?, object>(Pair<object?, object> p, out object? t, out object u)").WithLocation(12, 34), 133946Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(object? x, (object y, object? z)) = p").WithArguments("p", "void E.Deconstruct<object, object?>(Pair<object, object?> p, out object t, out object? u)").WithLocation(12, 9), 134239Diagnostic(ErrorCode.WRN_NullReferenceArgument, "var (x, (y, z)) = p").WithArguments("p", "void E.Deconstruct<object, object?>(Pair2<object, object?> p, out object t, out object? u)").WithLocation(21, 9), 135718Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "object Program.F(object x)").WithLocation(6, 18)); 135742Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "object Program.F(object x)").WithLocation(8, 18)); 136023Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y1").WithArguments("t", "void IA<T>.A(T t)").WithLocation(22, 22), 136026Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y1").WithArguments("t", "void IB<T>.B(T t)").WithLocation(23, 22), 136032Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("t", "void IA<T>.A(T t)").WithLocation(35, 22), 136035Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("t", "void IB<T>.B(T t)").WithLocation(36, 22)); 136167Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("other", "bool IEquatable<string>.Equals(string other)").WithLocation(28, 18) 136201Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("other", "bool IEquatable<string>.Equals(string other)").WithLocation(16, 25) 136415Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "bool G<T>.M1(object o)").WithLocation(7, 19), 136424Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("o", "bool G<T>.M1(object o)").WithLocation(16, 16), 140515Diagnostic(ErrorCode.WRN_NullReferenceArgument, "F").WithArguments("y", "A.A(object x, object y)").WithLocation(7, 23), 140544Diagnostic(ErrorCode.WRN_NullReferenceArgument, "F").WithArguments("y", "A.A(object x, object y)").WithLocation(7, 16), 140661Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string>(string t)").WithLocation(14, 13), 140700Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string>(string t)").WithLocation(13, 20), 140734Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string>(string t, int i)").WithLocation(13, 13)); 140763Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string>(string t, int i)").WithLocation(12, 24)); 140797Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string, string?>(string t, string? u)").WithLocation(14, 20), 140800Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string, string>(string t, string u)").WithLocation(15, 20)); 140831Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string, string?>(string t, string? u)").WithLocation(12, 35), 140834Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("t", "void E.F<string, string>(string t, string u)").WithLocation(13, 34)); 141349Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void E.F<object>(object x, object y)").WithLocation(17, 21), 141352Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("x", "void E.F<object>(object x, object y)").WithLocation(21, 34)); 141390Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("t", "T E.F<T>(T t)").WithLocation(17, 21), 141393Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("t", "T E.F<T>(T t)").WithLocation(21, 29)); 147908Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t2").WithArguments("t", "void C<T>.F0(T t)").WithLocation(19, 23), 147914Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t3").WithArguments("t", "void C<T>.F0(T t)").WithLocation(35, 23), 147920Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t4").WithArguments("t", "void C<T>.F0(T t)").WithLocation(51, 23), 147926Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t7").WithArguments("t", "void C<T>.F0(T t)").WithLocation(83, 23), 153601Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void Program.F<T1>(T1 t)").WithLocation(9, 15), 153610Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void Program.F<T5>(T5 t)").WithLocation(29, 15)); 153782Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("t", "void C<T>.F1(T t)").WithLocation(11, 19), 153788Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(T)y").WithArguments("t", "void C<T>.F1(T t)").WithLocation(12, 19), 153791Diagnostic(ErrorCode.WRN_NullReferenceArgument, "(T?)y").WithArguments("t", "void C<T>.F1(T t)").WithLocation(13, 19), 153794Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "void C<T>.F1(T t)").WithLocation(14, 19), 153797Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default(T)").WithArguments("t", "void C<T>.F1(T t)").WithLocation(15, 19)); 153866Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("t", "void C<T>.F(T t)").WithLocation(11, 15), 153869Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("t", "void C<T>.F(T t)").WithLocation(16, 15), 153872Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o").WithArguments("t", "void C<T>.F(T t)").WithLocation(21, 15)); 153905Diagnostic(ErrorCode.WRN_NullReferenceArgument, "iy").WithArguments("t", "void C<T>.F(T t)").WithLocation(20, 15)); 154603Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("u", "void A<T>.F<U>(U u)").WithLocation(7, 26), 154621Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("u", "void A<T>.F<U>(U u)").WithLocation(16, 26), 156361Diagnostic(ErrorCode.WRN_NullReferenceArgument, "t").WithArguments("", "delegate*<T, void>").WithLocation(8, 14), 157130Diagnostic(ErrorCode.WRN_NullReferenceArgument, "y").WithArguments("y", "object A.this[object? x, object y]").WithLocation(7, 22)); 157418Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "T C.FT<T>(T t)").WithLocation(30, 26), 157427Diagnostic(ErrorCode.WRN_NullReferenceArgument, "default").WithArguments("t", "T C.FTO<T>(T t)").WithLocation(35, 27), 160488Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x2").WithArguments("x", "void ITest28.Add(ITest28 x)").WithLocation(9, 31)
Semantics\NullableReferenceTypesVsPatterns.cs (2)
647Diagnostic(ErrorCode.WRN_NullReferenceArgument, "x").WithArguments("o", "void C.F(object o)").WithLocation(18, 19)); 2569Diagnostic(ErrorCode.WRN_NullReferenceArgument, "@bool switch { true => a, false => b }").WithArguments("t2", "I C.M1<I>(I t1, I t2)").WithLocation(9, 15)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Symbols\Source\NullablePublicAPITests.cs (4)
3240Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o1").WithArguments("u", "object? C<object?, object>.this[object u]").WithLocation(9, 19), 3243Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o1").WithArguments("u", "object? C<object?, object>.this[object u]").WithLocation(10, 23), 3249Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o1").WithArguments("u", "object C<object, object>.this[object u]").WithLocation(17, 19), 3252Diagnostic(ErrorCode.WRN_NullReferenceArgument, "o1").WithArguments("u", "object C<object, object>.this[object u]").WithLocation(18, 23));
Symbols\SymbolEqualityTests.cs (1)
79Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("o", "void Extensions.StringExt(object o)").WithLocation(17, 9));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
345case ErrorCode.WRN_NullReferenceArgument: