• A
    Fix local function capturing by another local function (#15773) · a7d43ec6
    Andy Gocke 提交于
    Local functions have already implemented their own frame management,
    including frame pointer "capturing" (which is implemented by passing a
    list of frames to the local function by-ref, rather than traditional
    lambda capturing which is implemented by keeping a linked list of frame
    pointers to parent frames).
    
    PR #14736 wired up local function lowering to the lambda frame pointer
    machinery, which is necessary for when a local function is captured by a
    lambda or converted to a delegate, but in the process it diverted
    control flow for pure local function capturing to the frame pointer
    machinery, which can't handle the structure of local function struct
    frame pointers.
    
    This PR resolves the issue by restoring the control flow for local
    functions capturing other local functions with by-ref struct frames.
    
    Fixes #15599
    a7d43ec6
CSharpCompilerEmitTest.csproj 10.3 KB