mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C#: Enable nullability in Semmle.Util
This commit is contained in:
@@ -9,10 +9,9 @@ namespace Semmle.Util
|
||||
/// dictionary. If a list does not already exist, a new list is
|
||||
/// created.
|
||||
/// </summary>
|
||||
public static void AddAnother<T1, T2>(this Dictionary<T1, List<T2>> dict, T1 key, T2 element)
|
||||
public static void AddAnother<T1, T2>(this Dictionary<T1, List<T2>> dict, T1 key, T2 element) where T1:notnull
|
||||
{
|
||||
List<T2> list;
|
||||
if (!dict.TryGetValue(key, out list))
|
||||
if (!dict.TryGetValue(key, out var list))
|
||||
{
|
||||
list = new List<T2>();
|
||||
dict[key] = list;
|
||||
|
||||
Reference in New Issue
Block a user