124 references to ERR_AnonMethToNonDel
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Statements.cs (1)
2068
conversionError(diagnostics, ErrorCode.
ERR_AnonMethToNonDel
, id, targetType);
Errors\ErrorFacts.cs (1)
1318
or ErrorCode.
ERR_AnonMethToNonDel
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
CodeGen\CodeGenTupleTest.cs (5)
7071
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(15, 20),
7127
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(15, 32),
7184
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(15, 20),
7238
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "string").WithLocation(15, 20),
7295
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(15, 21),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (111)
Semantics\AnonymousFunctionTests.cs (2)
1361
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "delegate*<void>").WithLocation(6, 41));
1402
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "delegate*<void>").WithLocation(6, 38));
Semantics\DelegateTypeTests.cs (96)
92
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(7, 16),
95
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Delegate").WithLocation(8, 13),
98
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(9, 51));
312
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(6, 23),
315
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.ICloneable").WithLocation(7, 27),
318
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(8, 25),
321
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.MulticastDelegate").WithLocation(9, 34));
356
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(6, 29),
359
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.ICloneable").WithLocation(7, 33),
362
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(8, 31),
365
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.MulticastDelegate").WithLocation(9, 40));
397
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(7, 27),
400
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(9, 29));
430
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression").WithLocation(7, 33),
433
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression").WithLocation(9, 35));
464
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(7, 24),
467
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(8, 31),
470
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(9, 26),
473
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(10, 28),
476
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression").WithLocation(11, 32),
479
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression").WithLocation(12, 34));
529
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression<System.Func<int>>").WithLocation(7, 44),
532
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression<System.Func<int>>").WithLocation(8, 46)
589
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "object").WithLocation(6, 20),
592
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.ICloneable").WithLocation(7, 24),
595
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Delegate").WithLocation(8, 22),
598
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.MulticastDelegate").WithLocation(9, 31));
628
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Linq.Expressions.Expression").WithLocation(6, 48),
631
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Linq.Expressions.Expression").WithLocation(7, 25),
634
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Linq.Expressions.LambdaExpression").WithLocation(8, 30),
637
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Linq.Expressions.LambdaExpression").WithLocation(9, 31));
678
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "dynamic").WithLocation(8, 16));
4188
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(7, 16));
4357
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(5, 51));
4530
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(5, 51));
4599
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(5, 52),
4602
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.LambdaExpression").WithLocation(6, 58),
4605
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression<System.Func<int>>").WithLocation(7, 70));
4651
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "Root.System.Linq.Expressions.Expression").WithLocation(7, 28),
4654
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "Root.System.Linq.Expressions.LambdaExpression").WithLocation(8, 34),
4657
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "Root.System.Linq.Expressions.Expression<System.Func<int>>").WithLocation(9, 39));
4796
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(6, 25));
5049
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Linq.Expressions.Expression").WithLocation(9, 11),
5052
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "System.Linq.Expressions.Expression").WithLocation(10, 11));
5173
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(9, 14),
5179
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(11, 14));
5894
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(10, 14),
5966
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(9, 14),
5969
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(10, 14));
6003
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(9, 14));
6035
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(9, 14));
6067
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(12, 14),
6070
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(12, 23));
6139
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(9, 14));
6171
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(11, 14));
8018
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Delegate").WithLocation(7, 38),
8021
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Linq.Expressions.Expression").WithLocation(8, 40));
14947
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "Program.Field").WithLocation(7, 33)
14989
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(16, 20),
14992
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(17, 20),
15044
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(15, 20),
15047
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(16, 20),
15056
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(19, 21),
15059
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(20, 21),
15121
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(24, 20),
15124
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(25, 20),
15127
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C3").WithLocation(26, 20),
15130
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C4").WithLocation(27, 20),
15139
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(30, 21),
15142
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(31, 21),
15145
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C3").WithLocation(32, 21),
15148
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C4").WithLocation(33, 21),
15193
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<object>").WithLocation(11, 27),
15196
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.ICloneable>").WithLocation(12, 31),
15205
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<object>").WithLocation(15, 28),
15208
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.ICloneable>").WithLocation(16, 32),
15258
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Delegate>").WithLocation(12, 29),
15261
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.MulticastDelegate>").WithLocation(13, 38),
15264
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Linq.Expressions.Expression>").WithLocation(14, 31),
15267
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Linq.Expressions.LambdaExpression>").WithLocation(15, 37),
15276
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Delegate>").WithLocation(18, 30),
15279
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.MulticastDelegate>").WithLocation(19, 39),
15282
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Linq.Expressions.Expression>").WithLocation(20, 32),
15285
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Linq.Expressions.LambdaExpression>").WithLocation(21, 38),
15370
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(15, 21),
15373
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(16, 21),
15429
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C1").WithLocation(24, 21),
15432
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C2").WithLocation(25, 21),
15435
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C3").WithLocation(26, 21),
15438
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C4").WithLocation(27, 21),
15479
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<object>").WithLocation(11, 28),
15482
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.ICloneable>").WithLocation(12, 32),
15526
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Delegate>").WithLocation(12, 30),
15529
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.MulticastDelegate>").WithLocation(13, 39),
15532
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Linq.Expressions.Expression>").WithLocation(14, 32),
15535
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "C<System.Linq.Expressions.LambdaExpression>").WithLocation(15, 38),
Semantics\DynamicTests.cs (1)
2836
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "dynamic").WithLocation(18, 20),
Semantics\FunctionPointerTests.cs (2)
2823
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "delegate*<string, int>").WithLocation(6, 40),
2826
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "delegate*<string, int>").WithLocation(7, 29));
Semantics\InterpolationTests.cs (1)
992
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(5, 36),
Semantics\LambdaTests.cs (4)
160
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(16, 20),
163
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "int").WithLocation(17, 18),
726
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "string").WithLocation(5, 40),
1173
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "System.Collections.Generic.IList<C>").WithLocation(9, 22));
Semantics\NullableReferenceTypesTests.cs (1)
2585
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "string").WithLocation(4, 41));
Semantics\NullableReferenceTypesVsPatterns.cs (2)
2501
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(9, 24),
2507
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "object").WithLocation(10, 25));
Semantics\SemanticErrorTests.cs (1)
15982
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
ERR_AnonMethToNonDel
, Line = 6, Column = 14 } });
Semantics\UnsafeTests.cs (1)
11092
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(11, 37));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\ConversionTests.cs (1)
2340
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "Q").WithLocation(46, 20),
Symbols\Source\NullablePublicAPITests.cs (1)
5041
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(9, 24));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Parsing\AnonymousFunctionParsingTests.cs (4)
1165
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(1, 43));
1172
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "=>").WithArguments("lambda expression", "int").WithLocation(1, 43));
1798
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "int").WithLocation(1, 41));
1805
Diagnostic(ErrorCode.
ERR_AnonMethToNonDel
, "delegate").WithArguments("anonymous method", "int").WithLocation(1, 41));