Skip to content

Generic recursion and generic dictionaries #85184

@jkotas

Description

@jkotas

Repro

Console.WriteLine(new G<string>().M());

class G<T>
{
    public object M()
    {
        return new G<List<T>>();
    }
}

Actual result:

AOT analysis warning IL3054: [repro]G<System.Collections.Generic.List<System.Collections.Generic.List<Syste m.Collections.Generic.List<System.Collections.Generic.List<string>>>>>: Generic expansion to 'G<List<List<Lis t<List<List<String>>>>>>' was aborted due to generic recursion.

Expected result:

No warning

Context: #85176 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions