Skip to content

TopologicalSort stack overflow when decompiling long method #3075

@sharwell

Description

@sharwell

The following method uses recursion instead of iteration for the call to Visit:

public List<Block> TopologicalSort(bool deleteUnreachableBlocks = false)

This will stack overflow when decompiling the following property:
https://github.com/microsoft/fluentui-blazor/blob/9d092562af1570269c62be9a99b6e7e9a7470c87/src/Assets/FluentUI.Icons/Icons/Icons.cs#L14

The property has the following general structure:

public static IEnumerable<IconInfo> AllIcons
{
    get
    {
        yield return new IconInfo { Name = "Accessibility", Variant = IconVariant.Filled, Size = IconSize.Size16 };
        yield return new IconInfo { Name = "Accessibility", Variant = IconVariant.Regular, Size = IconSize.Size16 };
        // ~14500 more 'yield return' lines 
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions