Skip to content

Generic Type Resolution #22

@uberFoo

Description

@uberFoo

These two lines are not equivalent, and they should be:

let a: Result<int, string> = Result::Ok(42);
let a = Result::<int, string>::Ok(42);

The former works fine and the latter results in tons of errors about expected Result and found Result<int, string>.

It's got something to do with the create_generic_enum function. We are creating a new type with the name Result<int, string>, which may be the completely wrong thing now.

Just did some messing about, and I can remove the code that creates the type with the concrete type names, and the broken test passes, but then match tests fail, because it's using that extended type name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions