using System;
public class C {
static void M()
{
static void localFunction() { }
Action a = localFunction;
}
}
Capturing the local function in an Action is causing it to be emitted as an instance function on an inner class, instead of being a static method.
https://sharplab.io/#v2:EYLgtghgzgLgpgJwDQxASwDZICYgNQA+AAgEwCMAsAFBEDMABKfQML0De1AkEWQGyMAWegFkAFAEouHKvXqdufQfQwB7AMYQMRAKww0KgHYT29AL7VZlyzxL0I9ALzL1mnXsMBuLuaqmgA==