120 references to WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
Microsoft.CodeAnalysis.CSharp (6)
Errors\ErrorFacts.cs (3)
36
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
));
454
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
:
1964
or ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
FlowAnalysis\NullableWalker.cs (2)
9148
ReportDiagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, arg.location,
9219
ReportDiagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, location,
Generated\ErrorFacts.Generated.cs (1)
214
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
:
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (10)
Semantics\CollectionExpressionTests.cs (1)
33021
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "() =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(10, 12)
Semantics\ExtensionTests.cs (9)
40059
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "oNull2.M").WithArguments("object? extension<object?>(object?).M()", "System.Func<object>").WithLocation(8, 26),
40062
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "oNull2.M2").WithArguments("object? E.M2<object?>(object? t)", "System.Func<object>").WithLocation(9, 26),
40065
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "oNull3.M").WithArguments("object? extension<object?>(object?).M()", "System.Func<object>").WithLocation(12, 29),
40068
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "oNull3.M2").WithArguments("object? E.M2<object?>(object? t)", "System.Func<object>").WithLocation(13, 29));
40134
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "oNull.M").WithArguments("object? extension<object?>(object?).M(object? t2)", "System.Func<object, object>").WithLocation(4, 33),
40137
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "oNull.M2").WithArguments("object? E.M2<object?>(object? t, object? t2)", "System.Func<object, object>").WithLocation(5, 34));
40251
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Derived1.M").WithArguments("object? extension<object?>(C<object?>).M()", "System.Func<object>").WithLocation(3, 25));
40299
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Derived1.M").WithArguments("object? extension<object?>(C<object?>).M()", "System.Func<object>").WithLocation(3, 9),
40305
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "new Derived1().M2").WithArguments("object? E.M2<object?>(C<object?> t)", "System.Func<object>").WithLocation(6, 9));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (103)
Semantics\DelegateTypeTests.cs (2)
9835
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "object? (object x3) =>").WithArguments("lambda expression", "System.Func<object, object>").WithLocation(12, 21),
9844
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "object? (object y3) =>").WithArguments("lambda expression", "System.Func<object, object>").WithLocation(16, 21),
Semantics\LambdaTests.cs (27)
4241
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "System.Func<object>").WithLocation(8, 27),
4244
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "System.Func<object?>").WithLocation(9, 28),
4288
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "System.Func<object>").WithLocation(13, 27),
4291
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D1").WithLocation(14, 17),
4294
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D3").WithLocation(16, 17),
4303
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "D2").WithLocation(20, 17),
4312
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "System.Func<object?>").WithLocation(23, 28),
4321
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] object? () =>").WithArguments("lambda expression", "D2").WithLocation(25, 18),
4409
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "System.Func<object>").WithLocation(13, 30),
4412
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D1").WithLocation(14, 20),
4415
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] () =>").WithArguments("lambda expression", "D3").WithLocation(16, 20),
4424
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "D2").WithLocation(20, 20),
4433
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] () =>").WithArguments("lambda expression", "System.Func<object?>").WithLocation(23, 31),
4442
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] object? () =>").WithArguments("lambda expression", "D2").WithLocation(25, 20),
4645
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, @"[return: NotNullIfNotNull(""o"")] (object? o) =>").WithArguments("lambda expression", "D3").WithLocation(17, 17),
5165
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string () =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(9, 28));
5189
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string? () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(10, 39));
5249
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string () =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(9, 28),
5252
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string? () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(10, 27),
5255
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "S<object> () =>").WithArguments("lambda expression", "System.Func<S<object?>>").WithLocation(13, 31),
5258
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "S<object?> () =>").WithArguments("lambda expression", "System.Func<S<object>>").WithLocation(14, 30));
5287
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref S<object> () =>").WithArguments("lambda expression", "D1<S<object?>>").WithLocation(10, 30),
5290
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref S<object?> () =>").WithArguments("lambda expression", "D1<S<object>>").WithLocation(11, 29),
5293
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref readonly S<object> () =>").WithArguments("lambda expression", "D2<S<object?>>").WithLocation(14, 30),
5296
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "ref readonly S<object?> () =>").WithArguments("lambda expression", "D2<S<object>>").WithLocation(15, 29));
5512
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string () =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(7, 28),
5518
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "string? () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(8, 27));
Semantics\NullableReferenceTypesTests.cs (74)
1956
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M2").WithArguments("string? C.M2(string? s)", "C.Copier").WithLocation(6, 20)
2471
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1").WithArguments("string? C.M1(string? x)", "System.Func<string, string>").WithLocation(13, 45),
4437
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "(D)M1").WithArguments("string? C.M1(string s)", "C.D").WithLocation(6, 17),
11032
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "NullableReturnMethod").WithArguments("string[]? C.NullableReturnMethod(string[] x)", "MyDelegate").WithLocation(18, 25),
39802
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: MaybeNull] string () =>").WithArguments("lambda expression", "System.Func<string>").WithLocation(28, 10),
39805
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "[return: NotNull] string?() =>").WithArguments("lambda expression", "System.Func<string?>").WithLocation(33, 10),
69203
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1").WithArguments("CL0<string?> C.M1(CL0<string> x)", "C.D1").WithLocation(14, 24),
69209
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M3").WithArguments("CL0<string> C.M3(CL0<string?> x)", "C.D2").WithLocation(24, 24),
69324
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<T?>").WithArguments("T? Program.F<T?>()", "D<T>").WithLocation(7, 22));
69461
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<object?>").WithArguments("object? C.F<object?>()", "D<object>").WithLocation(10, 27),
69464
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object?>>").WithArguments("I<object?> C.F<I<object?>>()", "D<I<object>>").WithLocation(12, 30),
69467
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object>>").WithArguments("I<object> C.F<I<object>>()", "D<I<object?>>").WithLocation(13, 31),
69470
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IIn<object>>").WithArguments("IIn<object> C.F<IIn<object>>()", "D<IIn<object?>>").WithLocation(15, 33),
69473
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IOut<object?>>").WithArguments("IOut<object?> C.F<IOut<object?>>()", "D<IOut<object>>").WithLocation(16, 33));
70074
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M1").WithArguments("string C.M1()", "System.Func<string>").WithLocation(19, 30),
70168
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M4").WithArguments("string? C.M4()", "D2").WithLocation(20, 20)
70229
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M1").WithArguments("string C.M1()", "System.Func<object>").WithLocation(27, 30),
70235
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "c.M5").WithArguments("string Program.M5(C c)", "System.Func<object>").WithLocation(37, 30),
70300
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "e.FirstOrDefault").WithArguments("string D.FirstOrDefault(string[] e)", "System.Func<string>").WithLocation(13, 26)
70341
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M2").WithArguments("ref readonly string? C.M2()", "D<string>").WithLocation(10, 24),
70344
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "d2").WithArguments("ref readonly string? D<string?>.Invoke()", "D<string>").WithLocation(15, 27),
70384
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M2").WithArguments("ref readonly string? C.M2()", "D1").WithLocation(11, 17),
70387
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "d2").WithArguments("ref readonly string? D2.Invoke()", "D1").WithLocation(16, 20)
70441
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method").WithArguments("string? Helper.Method(string? arg)", "System.Func<string?, string>").WithLocation(24, 16)
70594
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1<string?>").WithArguments("string? Helper.Method1<string?>(string? t)", "System.Func<string?, string>").WithLocation(15, 16),
70597
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1<T?>").WithArguments("T? Helper.Method1<T?>(T? t)", "System.Func<T, T>").WithLocation(23, 16),
70600
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1<T?>").WithArguments("T? Helper.Method1<T?>(T? t)", "System.Func<T?, T>").WithLocation(31, 16)
70702
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1(string? x, string? y)", "System.Func<string?, string?, string>").WithLocation(23, 16)
70754
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T>(T t)", "System.Func<T, string>").WithLocation(7, 16),
70757
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T>(T t)", "System.Func<T, string>").WithLocation(19, 16),
70760
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T?>(T? t)", "System.Func<T?, string>").WithLocation(28, 16));
70801
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T>(T t)", "D1<T>").WithLocation(6, 16),
70804
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Helper.Method1").WithArguments("string? Helper.Method1<T?>(T? t)", "D2<T>").WithLocation(10, 16));
70885
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<object?>").WithArguments("object? C.F<object?>()", "D<object>").WithLocation(10, 23),
70888
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object?>>").WithArguments("I<object?> C.F<I<object?>>()", "D<I<object>>").WithLocation(12, 26),
70891
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<I<object>>").WithArguments("I<object> C.F<I<object>>()", "D<I<object?>>").WithLocation(13, 27),
70894
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IIn<object>>").WithArguments("IIn<object> C.F<IIn<object>>()", "D<IIn<object?>>").WithLocation(15, 29),
70897
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F<IOut<object?>>").WithArguments("IOut<object?> C.F<IOut<object?>>()", "D<IOut<object>>").WithLocation(16, 29));
70972
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.M").WithArguments("object? A<object?>.M()", "D<object>").WithLocation(13, 23));
73077
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1<string?>").WithArguments("string? C.M1<string?>()", "System.Func<string>").WithLocation(17, 34),
73080
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1<CL0<string>>").WithArguments("CL0<string> C.M1<CL0<string>>()", "System.Func<CL0<string?>>").WithLocation(22, 40),
73083
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1<CL0<string?>>").WithArguments("CL0<string?> C.M1<CL0<string?>>()", "System.Func<CL0<string>>").WithLocation(27, 39)
73116
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "(System.Func<string>)M1<string?>").WithArguments("string? C.M1<string?>()", "System.Func<string>").WithLocation(13, 34),
73119
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),
73122
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)
78169
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F2").WithArguments("string? C.F2()", "D<object>").WithLocation(12, 19),
78172
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "F4").WithArguments("object? C.F4()", "D<object>").WithLocation(14, 19));
140938
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(12, 13),
140941
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F<T?>").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(14, 13),
140944
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(16, 22),
140947
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "t.F<T?>").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(18, 22));
141015
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(y).F").WithArguments("object? C<object?>.F()", "D<object>").WithLocation(18, 14),
141018
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(y).F").WithArguments("object? C<object?>.F()", "D<object>").WithLocation(22, 27));
141220
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(15, 13),
141223
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(16, 13),
141226
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(17, 13),
141229
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(18, 27),
141232
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(19, 27),
141235
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? C<string?>.F()", "D<string>").WithLocation(20, 27));
141273
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("object? E.F<object?>(object? t)", "D<object>").WithLocation(17, 14),
141276
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("object? E.F<object?>(object? t)", "D<object>").WithLocation(21, 27));
141471
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(18, 13),
141474
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(19, 13),
141477
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(20, 13),
141480
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "Create(s).F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(21, 27),
141483
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(22, 27),
141486
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "y.F").WithArguments("string? E.F<string?>(C<string?> c)", "D<string>").WithLocation(23, 27));
141556
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(14, 22),
141559
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "x.F").WithArguments("T? E.F<T?>(T? t)", "D<T>").WithLocation(15, 26));
141587
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "default(string).F").WithArguments("string? E.F<string?>(string? t)", "D<string>").WithLocation(10, 4));
159004
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "f1").WithArguments("object f1()", "System.Func<object>").WithLocation(9, 27),
160585
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M1").WithArguments("CL0<string?> C.M1(CL0<string> x)", "C.D1").WithLocation(14, 24),
160591
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
, "M3").WithArguments("CL0<string> C.M3(CL0<string?> x)", "C.D2").WithLocation(24, 24),
160653
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)
366
case ErrorCode.
WRN_NullabilityMismatchInReturnTypeOfTargetDelegate
: