We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25019db commit 83a5ef4Copy full SHA for 83a5ef4
csharp/ql/test/library-tests/csharp10/Lambda.cs
@@ -4,8 +4,17 @@ public class Lambda
4
{
5
public void M1()
6
7
+ // Examples need for implicitly typed lambdas.
8
Func<int, string> f1 = (int x) => x.ToString();
9
var f2 = (int x) => x.ToString();
10
+
11
+ // Examples need for explicit return type for implicitly and explicitly typed lambda.
12
+ var f3 = object (bool b) => b ? "1" : 0;
13
+ Func<bool, object> f4 = object (bool b) => b ? "1" : 0;
14
15
+ // Examples needed for explicit return type for downcast.
16
+ var f5 = int (bool b) => b ? 1 : 0;
17
+ var f6 = object (bool b) => b ? 1 : 0;
18
}
19
20
0 commit comments