110 references to WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
Microsoft.CodeAnalysis.CSharp (6)
Errors\ErrorFacts.cs (3)
36
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
));
441
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
:
1907
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
:
FlowAnalysis\NullableWalker.cs (2)
7793
ReportDiagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, arg.location,
7857
ReportDiagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, location,
Generated\ErrorFacts.Generated.cs (1)
214
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (103)
Semantics\DelegateTypeTests.cs (2)
7022
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "object? (object x3) =>").WithArguments("lambda expression", "System.Func<object, object>").WithLocation(12, 21),
7031
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "object? (object y3) =>").WithArguments("lambda expression", "System.Func<object, object>").WithLocation(16, 21),
Semantics\LambdaTests.cs (27)
4226
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "System.Func<object>").WithLocation(8, 27),
4229
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "System.Func<object?>").WithLocation(9, 28),
4273
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "System.Func<object>").WithLocation(13, 27),
4276
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D1").WithLocation(14, 17),
4279
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D3").WithLocation(16, 17),
4288
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "D2").WithLocation(20, 17),
4297
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "System.Func<object?>").WithLocation(23, 28),
4306
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] object? () =>").WithArguments("lambda expression", "D2").WithLocation(25, 18),
4394
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "System.Func<object>").WithLocation(13, 30),
4397
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D1").WithLocation(14, 20),
4400
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D3").WithLocation(16, 20),
4409
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "D2").WithLocation(20, 20),
4418
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "System.Func<object?>").WithLocation(23, 31),
4427
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] object? () =>").WithArguments("lambda expression", "D2").WithLocation(25, 20),
4630
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, @"[return: NotNullIfNotNull(""o"")] (object? o) =>").WithArguments("lambda expression", "D3").WithLocation(17, 17),
5123
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string () =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(9, 28));
5147
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string? () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(10, 39));
5207
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string () =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(9, 28),
5210
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string? () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(10, 27),
5213
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "S<object> () =>").WithArguments("lambda expression", "System.Func<S<object?>>").WithLocation(13, 31),
5216
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "S<object?> () =>").WithArguments("lambda expression", "System.Func<S<object>>").WithLocation(14, 30));
5245
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref S<object> () =>").WithArguments("lambda expression", "D1<S<object?>>").WithLocation(10, 30),
5248
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref S<object?> () =>").WithArguments("lambda expression", "D1<S<object>>").WithLocation(11, 29),
5251
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref readonly S<object> () =>").WithArguments("lambda expression", "D2<S<object?>>").WithLocation(14, 30),
5254
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref readonly S<object?> () =>").WithArguments("lambda expression", "D2<S<object>>").WithLocation(15, 29));
5476
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string () =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(7, 28),
5482
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string? () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(8, 27));
Semantics\NullableReferenceTypesTests.cs (74)
1944
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M2").WithArguments("string? C.M2(string? s)", "C.Copier").WithLocation(6, 20)
2459
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1").WithArguments("string? C.M1(string? x)", "System.Func<string, string>").WithLocation(13, 45),
4425
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "(D)M1").WithArguments("string? C.M1(string s)", "C.D").WithLocation(6, 17),
11020
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "NullableReturnMethod").WithArguments("string[]? C.NullableReturnMethod(string[] x)", "MyDelegate").WithLocation(18, 25),
37736
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] string () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(28, 10),
37739
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] string?() =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(33, 10),
65744
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1").WithArguments("CL0<string?> C.M1(CL0<string> x)", "C.D1").WithLocation(14, 24),
65750
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M3").WithArguments("CL0<string> C.M3(CL0<string?> x)", "C.D2").WithLocation(24, 24),
65865
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<T?>").WithArguments("T? Program.F<T?>()", "D<T>").WithLocation(7, 22));
66002
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<object?>").WithArguments("object? C.F<object?>()", "D<object>").WithLocation(10, 27),
66005
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object?>>").WithArguments("I<object?> C.F<I<object?>>()", "D<I<object>>").WithLocation(12, 30),
66008
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object>>").WithArguments("I<object> C.F<I<object>>()", "D<I<object?>>").WithLocation(13, 31),
66011
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IIn<object>>").WithArguments("IIn<object> C.F<IIn<object>>()", "D<IIn<object?>>").WithLocation(15, 33),
66014
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IOut<object?>>").WithArguments("IOut<object?> C.F<IOut<object?>>()", "D<IOut<object>>").WithLocation(16, 33));
66615
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M1").WithArguments("string C.M1()", "System.Func<string>").WithLocation(19, 30),
66709
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M4").WithArguments("string? C.M4()", "D2").WithLocation(20, 20)
66770
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M1").WithArguments("string C.M1()", "System.Func<object>").WithLocation(27, 30),
66776
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M5").WithArguments("string Program.M5(C c)", "System.Func<object>").WithLocation(37, 30),
66841
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "e.FirstOrDefault").WithArguments("string D.FirstOrDefault(string[] e)", "System.Func<string>").WithLocation(13, 26)
66882
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M2").WithArguments("ref readonly string? C.M2()", "D<string>").WithLocation(10, 24),
66885
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "d2").WithArguments("ref readonly string? D<string?>.Invoke()", "D<string>").WithLocation(15, 27),
66925
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M2").WithArguments("ref readonly string? C.M2()", "D1").WithLocation(11, 17),
66928
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "d2").WithArguments("ref readonly string? D2.Invoke()", "D1").WithLocation(16, 20)
66982
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method").WithArguments("string? Helper.Method(string? arg)", "System.Func<string?, string>").WithLocation(24, 16)
67135
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1<string?>").WithArguments("string? Helper.Method1<string?>(string? t)", "System.Func<string?, string>").WithLocation(15, 16),
67138
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1<T?>").WithArguments("T? Helper.Method1<T?>(T? t)", "System.Func<T, T>").WithLocation(23, 16),
67141
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1<T?>").WithArguments("T? Helper.Method1<T?>(T? t)", "System.Func<T?, T>").WithLocation(31, 16)
67243
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1(string? x, string? y)", "System.Func<string?, string?, string>").WithLocation(23, 16)
67295
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T>(T t)", "System.Func<T, string>").WithLocation(7, 16),
67298
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T>(T t)", "System.Func<T, string>").WithLocation(19, 16),
67301
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T?>(T? t)", "System.Func<T?, string>").WithLocation(28, 16));
67342
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T>(T t)", "D1<T>").WithLocation(6, 16),
67345
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T?>(T? t)", "D2<T>").WithLocation(10, 16));
67426
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<object?>").WithArguments("object? C.F<object?>()", "D<object>").WithLocation(10, 23),
67429
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object?>>").WithArguments("I<object?> C.F<I<object?>>()", "D<I<object>>").WithLocation(12, 26),
67432
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object>>").WithArguments("I<object> C.F<I<object>>()", "D<I<object?>>").WithLocation(13, 27),
67435
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IIn<object>>").WithArguments("IIn<object> C.F<IIn<object>>()", "D<IIn<object?>>").WithLocation(15, 29),
67438
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IOut<object?>>").WithArguments("IOut<object?> C.F<IOut<object?>>()", "D<IOut<object>>").WithLocation(16, 29));
67513
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.M").WithArguments("object? A<object?>.M()", "D<object>").WithLocation(13, 23));
69608
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1<string?>").WithArguments("string? C.M1<string?>()", "System.Func<string>").WithLocation(17, 34),
69611
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1<CL0<string>>").WithArguments("CL0<string> C.M1<CL0<string>>()", "System.Func<CL0<string?>>").WithLocation(22, 40),
69614
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1<CL0<string?>>").WithArguments("CL0<string?> C.M1<CL0<string?>>()", "System.Func<CL0<string>>").WithLocation(27, 39)
69647
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "(System.Func<string>)M1<string?>").WithArguments("string? C.M1<string?>()", "System.Func<string>").WithLocation(13, 34),
69650
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "(System.Func<CL0<string?>>)M1<CL0<string>>").WithArguments("CL0<string> C.M1<CL0<string>>()", "System.Func<CL0<string?>>").WithLocation(14, 40),
69653
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "(System.Func<CL0<string>>)M1<CL0<string?>>").WithArguments("CL0<string?> C.M1<CL0<string?>>()", "System.Func<CL0<string>>").WithLocation(15, 39)
74474
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F2").WithArguments("string? C.F2()", "D<object>").WithLocation(12, 19),
74477
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F4").WithArguments("object? C.F4()", "D<object>").WithLocation(14, 19));
136638
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(12, 13),
136641
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F<T?>").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(14, 13),
136644
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(16, 22),
136647
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F<T?>").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(18, 22));
136686
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(y).F").WithArguments("object? C<object?>.F()", "D<object>").WithLocation(18, 14),
136689
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(y).F").WithArguments("object? C<object?>.F()", "D<object>").WithLocation(22, 27));
136891
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(15, 13),
136894
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(16, 13),
136897
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(17, 13),
136900
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(18, 27),
136903
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(19, 27),
136906
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(20, 27));
136944
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("object? E.F<object?>(object? t)", "D<object>").WithLocation(17, 14),
136947
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("object? E.F<object?>(object? t)", "D<object>").WithLocation(21, 27));
137142
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(18, 13),
137145
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(19, 13),
137148
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(20, 13),
137151
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(21, 27),
137154
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(22, 27),
137157
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(23, 27));
137227
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(14, 22),
137230
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(15, 26));
137258
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "default(string).F").WithArguments("string? E.F<string?>(string? t)", "D<string>").WithLocation(10, 4));
154528
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "f1").WithArguments("object f1()", "System.Func<object>").WithLocation(9, 27),
156106
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1").WithArguments("CL0<string?> C.M1(CL0<string> x)", "C.D1").WithLocation(14, 24),
156112
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M3").WithArguments("CL0<string> C.M3(CL0<string?> x)", "C.D2").WithLocation(24, 24),
156174
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "d2").WithArguments("ref readonly string? D<string?>.Invoke()", "D<string>").WithLocation(9, 28)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
344
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
: