Skip to content

No completion for enum variants through type alias #8730

@flodiebold

Description

@flodiebold
enum Enum {
    VariantA,
    VariantB
}

type Type = Enum;

fn main() {
    let x = Type::<|>;
}

We should get completions for the variants, but currently don't. Very annoying in hir_ty currently, since we have so many type aliases for Chalk enums there 😅 Type inference works otherwise for e.g. Type::VariantA, so this seems to be a completion problem (well, the actual problem is that a lot of this name resolution logic happens inside of type inference and can't be reused by completion right now).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-completionautocompletionS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions