Skip to content

Make ty params non-positional #2364

@catamorphism

Description

@catamorphism

@nikomatsakis and I agreed that it would be better to change the ty::substs type to have the tps field be a map from node IDs to types, rather than a vector of types as it is now. This allows ty params to be referred to based on their node IDs rather than positionally as they are now. Among other things, this addresses a bug in the code that I'm trying to isolate in which class ty params get concatenated with method ty params and sometimes a param gets duplicated. Niko said he would do this as a byproduct of rewriting the code for self types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions