C#: Add regression test

This commit is contained in:
Tom Hvitved
2019-11-29 10:10:24 +01:00
parent ba4fb82a08
commit a062d7d41c
2 changed files with 19 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /langversion:8.0
using System;
using System.Threading.Tasks;
@@ -180,4 +180,13 @@ class UsingDiscard
}
}
class TupleMatching
{
(int, object) G(object o1, object o2)
{
(object, object)? pair = (o1, o2);
return (0, pair is var (x, y) ? x : null);
}
}
// semmle-extractor-options: /r:System.Dynamic.Runtime.dll

View File

@@ -82,3 +82,12 @@
| Program.cs:169:5:169:10 | String |
| Program.cs:174:5:174:8 | Void |
| Program.cs:176:17:176:19 | IDisposable |
| Program.cs:185:5:185:17 | (Int32,Object) |
| Program.cs:185:6:185:8 | Int32 |
| Program.cs:185:11:185:16 | Object |
| Program.cs:185:21:185:26 | Object |
| Program.cs:185:32:185:37 | Object |
| Program.cs:187:9:187:24 | (Object,Object) |
| Program.cs:187:9:187:25 | Nullable<(Object,Object)> |
| Program.cs:187:10:187:15 | Object |
| Program.cs:187:18:187:23 | Object |