mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
C#: Add/update tests and expected output.
This commit is contained in:
@@ -307,4 +307,10 @@ public class ContainerTest
|
||||
{
|
||||
Out(out var strings); // BAD: but allow for now (only C# 7 allows discards)
|
||||
}
|
||||
|
||||
IList<int> TestNullcoalescingInitializations()
|
||||
{
|
||||
var l = new List<int> { 1, 2, 3 }; // GOOD: returned
|
||||
return l ??= new List<int>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user