Skip to content

recursive bounds do not work (a.k.a., f-bounded polymorphism) #2355

Closed
@nikomatsakis

Description

@nikomatsakis

The following fails:

iface foo<A> { }
fn bar(A: foo<A>) { ... }

Weird as it looks there are good use cases for this. We should support it. IIRC, the code almost does it right, or maybe even does it right, if the name resolution were patched up properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions