Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Type Resolution #22

Open
uberFoo opened this issue Dec 16, 2023 · 0 comments
Open

Generic Type Resolution #22

uberFoo opened this issue Dec 16, 2023 · 0 comments

Comments

@uberFoo
Copy link
Owner

uberFoo commented Dec 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant