PVS Studio throws V3137: The 'funclist' variable is assigned but is not used until the end of the function. Program.cs 13
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace V3137_False_Positive
{
class Program
{
static void Main()
{
List<(string name, Func<Task> func)> funclist;
funclist = new List<(string name, Func<Task> func)>
{
("Test", new Func<Task>(() => Task.CompletedTask)),
};
foreach ((string name, Func<Task> func) in funclist)
{
var task = func;
}
}
}
}
Is this a false positive?